homebridge-config-ui-x 5.4.1 → 5.4.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/package.json +2 -2
- package/public/assets/service-icons/door.svg +23 -2
- package/public/assets/service-icons/fan.svg +2 -2
- package/public/assets/service-icons/garage-door.svg +1 -1
- package/public/assets/service-icons/irrigation-system.svg +34 -0
- package/public/assets/service-icons/lock-mechanism.svg +39 -0
- package/public/assets/service-icons/security-system.svg +19 -0
- package/public/assets/service-icons/stateless-programmable-switch.svg +2 -2
- package/public/assets/service-icons/valve-faucet.svg +22 -0
- package/public/assets/service-icons/valve-generic.svg +25 -0
- package/public/assets/service-icons/valve-irrigation.svg +34 -0
- package/public/assets/service-icons/valve-shower-head.svg +32 -0
- package/public/assets/service-icons/window-covering.svg +2 -2
- package/public/assets/service-icons/window.svg +4 -0
- package/public/{chunk-M4QDQWSG.js → chunk-2C3X2ESN.js} +1 -1
- package/public/{chunk-ER4N7WWQ.js → chunk-2LEJFO4U.js} +1 -1
- package/public/{chunk-YO7SFY4E.js → chunk-2LMFJYC4.js} +1 -1
- package/public/{chunk-2DRGGCL6.js → chunk-33UHWR5O.js} +1 -1
- package/public/{chunk-DFLIHKAC.js → chunk-3ERUWF5D.js} +1 -1
- package/public/chunk-46JGHSBB.js +1 -0
- package/public/{chunk-J3QUQJAX.js → chunk-4HRWU2J3.js} +1 -1
- package/public/chunk-4TF2J3KA.js +1 -0
- package/public/{chunk-EQHN6CPG.js → chunk-5E4D6S2D.js} +1 -1
- package/public/{chunk-FMZEX6EI.js → chunk-6EH7VRJE.js} +1 -1
- package/public/{chunk-E2BQMFOO.js → chunk-6X3MH72N.js} +1 -1
- package/public/{chunk-VUXV5F3D.js → chunk-7BA3FPY6.js} +1 -1
- package/public/{chunk-KYB236MX.js → chunk-7EQFLCW4.js} +1 -1
- package/public/{chunk-G2UERN7F.js → chunk-AC47AP7G.js} +1 -1
- package/public/{chunk-AVMRG6LJ.js → chunk-ADF46RFT.js} +1 -1
- package/public/{chunk-WP55NF6D.js → chunk-B57CTOBG.js} +1 -1
- package/public/{chunk-KBHPX4TF.js → chunk-BNC2LVDJ.js} +1 -1
- package/public/{chunk-6VEFADT5.js → chunk-BYDZXXU7.js} +1 -1
- package/public/{chunk-H7SE35UN.js → chunk-C54645MD.js} +1 -1
- package/public/{chunk-HO4UVRDI.js → chunk-CMOVUX6R.js} +1 -1
- package/public/{chunk-IA2EYXXP.js → chunk-D7HRLNTC.js} +1 -1
- package/public/{chunk-3QBYXJ7T.js → chunk-D7VCPH6W.js} +1 -1
- package/public/{chunk-6HJHVJPI.js → chunk-DFFTJVRY.js} +1 -1
- package/public/{chunk-TYM2IKKZ.js → chunk-DP45OUJJ.js} +1 -1
- package/public/{chunk-O6QIOU32.js → chunk-EKCAZN24.js} +1 -1
- package/public/{chunk-6PUQJMXN.js → chunk-ESIX4ZF5.js} +1 -1
- package/public/chunk-FMXKLBH7.js +1 -0
- package/public/{chunk-5UXBLAGX.js → chunk-FUYV7IZZ.js} +1 -1
- package/public/{chunk-HHGB2T2Q.js → chunk-FVKMBZOU.js} +1 -1
- package/public/{chunk-ULWO2VVV.js → chunk-FXJWZ2UF.js} +1 -1
- package/public/{chunk-ZGXQHCAZ.js → chunk-GS72D2DZ.js} +1 -1
- package/public/{chunk-DYB33NRF.js → chunk-H45DK7IX.js} +1 -1
- package/public/{chunk-V35TPDVW.js → chunk-H5WTK5UT.js} +1 -1
- package/public/{chunk-G7J6XGY5.js → chunk-HLNHT6LZ.js} +1 -1
- package/public/chunk-HPHUBXGR.js +12 -0
- package/public/{chunk-XTHHRD72.js → chunk-HTZJUJUZ.js} +1 -1
- package/public/{chunk-PPSFRNJC.js → chunk-HWAWBYVQ.js} +1 -1
- package/public/chunk-IOKYXV5M.js +4 -0
- package/public/{chunk-FYI7RHOJ.js → chunk-IWFKJHPR.js} +1 -1
- package/public/{chunk-G6KV6PYE.js → chunk-J6CJ26QN.js} +1 -1
- package/public/{chunk-NZ3SNZL4.js → chunk-J7JPVBEU.js} +1 -1
- package/public/chunk-JCCQ75XM.js +1 -0
- package/public/{chunk-FYDO54CR.js → chunk-KZKL7DGI.js} +1 -1
- package/public/{chunk-5CQQ6P7K.js → chunk-LJIRF4HJ.js} +1 -1
- package/public/{chunk-ZFBUCUQW.js → chunk-LJL5JUBH.js} +1 -1
- package/public/{chunk-7YPOSTMY.js → chunk-MFYUC6U7.js} +1 -1
- package/public/{chunk-GZH3YYXD.js → chunk-MP3K6Q5N.js} +1 -1
- package/public/{chunk-4TADR47H.js → chunk-MSAADZHQ.js} +1 -1
- package/public/{chunk-KLQ6BEKS.js → chunk-OA7Y3E5A.js} +1 -1
- package/public/{chunk-RANTT44U.js → chunk-PWOW5ZGG.js} +1 -1
- package/public/{chunk-AVVYKDTL.js → chunk-QBC4X3JS.js} +1 -1
- package/public/{chunk-7IWNYMNH.js → chunk-QN444QJC.js} +1 -1
- package/public/{chunk-YLBALIW6.js → chunk-QSP4KI3N.js} +1 -1
- package/public/{chunk-RZ4UMDVF.js → chunk-QX6BFGHZ.js} +1 -1
- package/public/{chunk-PGM4QIVA.js → chunk-S6BEKQWI.js} +1 -1
- package/public/{chunk-BPGGCIV2.js → chunk-SKU647MV.js} +1 -1
- package/public/{chunk-WRO77OEO.js → chunk-TPRXTBLB.js} +1 -1
- package/public/{chunk-F37WZQGE.js → chunk-ULDXS7ZK.js} +1 -1
- package/public/{chunk-3JNJJOX6.js → chunk-V6JVOQNN.js} +1 -1
- package/public/chunk-VDRXJTTX.js +1 -0
- package/public/{chunk-SZXKSRVG.js → chunk-VQAYHIBO.js} +1 -1
- package/public/{chunk-RCYYU6LQ.js → chunk-WCOLHYTR.js} +1 -1
- package/public/{chunk-JCYDPJQ5.js → chunk-WTDK2HE6.js} +1 -1
- package/public/{chunk-DFZAFAJ3.js → chunk-WXQICPJE.js} +1 -1
- package/public/{chunk-KGKX7ALV.js → chunk-YQ7MFP33.js} +1 -1
- package/public/{chunk-RGXCQLZU.js → chunk-Z2T4OZ7I.js} +1 -1
- package/public/{chunk-NRX2DKWS.js → chunk-Z4YLS7KX.js} +1 -1
- package/public/{chunk-EZQF5CUM.js → chunk-ZUTM7S4U.js} +1 -1
- package/public/{chunk-WYHYUPM6.js → chunk-ZY5SUCRL.js} +1 -1
- package/public/index.html +1 -1
- package/public/{main-YBDT5CSM.js → main-VZG2XBKX.js} +1 -1
- package/public/assets/hap-icons/irrigation-system.svg +0 -49
- package/public/assets/hap-icons/lock-locked.svg +0 -25
- package/public/assets/hap-icons/lock-unlocked.svg +0 -25
- package/public/assets/hap-icons/security-system-active.svg +0 -103
- package/public/assets/hap-icons/security-system-off.svg +0 -69
- package/public/assets/hap-icons/security-system-triggered.svg +0 -103
- package/public/assets/hap-icons/stateless-programmable-switch.svg +0 -52
- package/public/assets/hap-icons/valve-faucet.svg +0 -21
- package/public/assets/hap-icons/valve-generic.svg +0 -28
- package/public/assets/hap-icons/valve-irrigation.svg +0 -38
- package/public/assets/hap-icons/valve-shower-head.svg +0 -52
- package/public/chunk-33VXBD5W.js +0 -12
- package/public/chunk-645YHJEQ.js +0 -4
- package/public/chunk-EF3XRHYY.js +0 -1
- package/public/chunk-IDFQPWF6.js +0 -1
- package/public/chunk-L6SKGR7C.js +0 -1
- package/public/chunk-ZBNNBPMQ.js +0 -1
- package/public/chunk-ZC3LHWJU.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$c as fe,Bc as c,Ca as E,D as Se,Da as g,Db as xe,Fa as N,Gb as Pe,Hb as x,Oc as m,Pc as w,Vc as ce,Yc as he,a as h,b as f,bc as V,da as $,fa as d,fb as O,gb as o,ha as q,ja as A,la as z,n as we,nb as Z,ob as l,oc as de,q as Fe,qb as u,ub as C,wa as Ne,x as Ie,xb as Oe,za as M}from"./chunk-645YHJEQ.js";var Le=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(i){return new(i||n)(o(O),o(N))};static \u0275dir=l({type:n})}return n})(),H=(()=>{class n extends Le{static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,features:[u]})}return n})(),b=new A(""),pt={provide:b,useExisting:d(()=>mt),multi:!0},mt=(()=>{class n extends H{writeValue(e){this.setProperty("checked",e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&V("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[c([pt]),u]})}return n})(),_t={provide:b,useExisting:d(()=>We),multi:!0};function vt(){let n=fe()?fe().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var yt=new A(""),We=(()=>{class n extends Le{_compositionMode;_composing=!1;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!vt())}writeValue(e){let i=e??"";this.setProperty("value",i)}_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)}static \u0275fac=function(i){return new(i||n)(o(O),o(N),o(yt,8))};static \u0275dir=l({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&V("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},standalone:!1,features:[c([_t]),u]})}return n})();function me(n){return n==null||_e(n)===0}function _e(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var y=new A(""),L=new A(""),Ct=/^(?=.{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])?)*$/,Re=class{static min(t){return $e(t)}static max(t){return qe(t)}static required(t){return ze(t)}static requiredTrue(t){return Vt(t)}static email(t){return Dt(t)}static minLength(t){return bt(t)}static maxLength(t){return At(t)}static pattern(t){return Ze(t)}static nullValidator(t){return Y()}static compose(t){return et(t)}static composeAsync(t){return tt(t)}};function $e(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function qe(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function ze(n){return me(n.value)?{required:!0}:null}function Vt(n){return n.value===!0?null:{required:!0}}function Dt(n){return me(n.value)||Ct.test(n.value)?null:{email:!0}}function bt(n){return t=>{let e=t.value?.length??_e(t.value);return e===null||e===0?null:e<n?{minlength:{requiredLength:n,actualLength:e}}:null}}function At(n){return t=>{let e=t.value?.length??_e(t.value);return e!==null&&e>n?{maxlength:{requiredLength:n,actualLength:e}}:null}}function Ze(n){if(!n)return Y;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(me(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function Y(n){return null}function Xe(n){return n!=null}function Ye(n){return xe(n)?Fe(n):n}function Ke(n){let t={};return n.forEach(e=>{t=e!=null?h(h({},t),e):t}),Object.keys(t).length===0?null:t}function Je(n,t){return t.map(e=>e(n))}function Mt(n){return!n.validate}function Qe(n){return n.map(t=>Mt(t)?t:e=>t.validate(e))}function et(n){if(!n)return null;let t=n.filter(Xe);return t.length==0?null:function(e){return Ke(Je(e,t))}}function ve(n){return n!=null?et(Qe(n)):null}function tt(n){if(!n)return null;let t=n.filter(Xe);return t.length==0?null:function(e){let i=Je(e,t).map(Ye);return Se(i).pipe(Ie(Ke))}}function ye(n){return n!=null?tt(Qe(n)):null}function ke(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function nt(n){return n._rawValidators}function it(n){return n._rawAsyncValidators}function ge(n){return n?Array.isArray(n)?n:[n]:[]}function K(n,t){return Array.isArray(n)?n.includes(t):n===t}function je(n,t){let e=ge(t);return ge(n).forEach(r=>{K(e,r)||e.push(r)}),e}function Ge(n,t){return ge(t).filter(e=>!K(n,e))}var J=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=ve(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=ye(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},_=class extends J{name;get formDirective(){return null}get path(){return null}},v=class extends J{_parent=null;name=null;valueAccessor=null},Q=class{_cd;constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},Et={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},wn=f(h({},Et),{"[class.ng-submitted]":"isSubmitted"}),Fn=(()=>{class n extends Q{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(v,2))};static \u0275dir=l({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&de("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[u]})}return n})(),In=(()=>{class n extends Q{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(_,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&de("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},standalone:!1,features:[u]})}return n})();var P="VALID",X="INVALID",F="PENDING",R="DISABLED",D=class{},ee=class extends D{value;source;constructor(t,e){super(),this.value=t,this.source=e}},j=class extends D{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},G=class extends D{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},I=class extends D{status;source;constructor(t,e){super(),this.status=t,this.source=e}},te=class extends D{source;constructor(t){super(),this.source=t}},ne=class extends D{source;constructor(t){super(),this.source=t}};function Ce(n){return(oe(n)?n.validators:n)||null}function wt(n){return Array.isArray(n)?ve(n):n||null}function Ve(n,t){return(oe(t)?t.asyncValidators:n)||null}function Ft(n){return Array.isArray(n)?ye(n):n||null}function oe(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function rt(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new $(1e3,"");if(!i[e])throw new $(1001,"")}function st(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new $(1002,"")})}var T=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){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 status(){return m(this.statusReactive)}set status(t){m(()=>this.statusReactive.set(t))}_status=w(()=>this.statusReactive());statusReactive=M(void 0);get valid(){return this.status===P}get invalid(){return this.status===X}get pending(){return this.status==F}get disabled(){return this.status===R}get enabled(){return this.status!==R}errors;get pristine(){return m(this.pristineReactive)}set pristine(t){m(()=>this.pristineReactive.set(t))}_pristine=w(()=>this.pristineReactive());pristineReactive=M(!0);get dirty(){return!this.pristine}get touched(){return m(this.touchedReactive)}set touched(t){m(()=>this.touchedReactive.set(t))}_touched=w(()=>this.touchedReactive());touchedReactive=M(!1);get untouched(){return!this.touched}_events=new we;events=this._events.asObservable();valueChanges;statusChanges;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(je(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(je(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Ge(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Ge(t,this._rawAsyncValidators))}hasValidator(t){return K(this._rawValidators,t)}hasAsyncValidator(t){return K(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(f(h({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new G(!0,i))}markAllAsDirty(t={}){this.markAsDirty({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(t))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,i),e&&t.emitEvent!==!1&&this._events.next(new G(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(f(h({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new j(!1,i))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,i),e&&t.emitEvent!==!1&&this._events.next(new j(!0,i))}markAsPending(t={}){this.status=F;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new I(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(f(h({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=R,this.errors=null,this._forEachChild(r=>{r.disable(f(h({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new ee(this.value,i)),this._events.next(new I(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(f(h({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=P,this._forEachChild(i=>{i.enable(f(h({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(f(h({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===P||this.status===F)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new ee(this.value,e)),this._events.next(new I(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(f(h({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?R:P}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=F,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:t!==!1};let i=Ye(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new I(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new C,this.statusChanges=new C}_calculateStatus(){return this._allControlsDisabled()?R:this.errors?X:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(F)?F:this._anyControlsHaveStatus(X)?X:P}_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,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new j(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new G(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){oe(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=wt(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=Ft(this._rawAsyncValidators)}},B=class extends T{constructor(t,e,i){super(Ce(e),Ve(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){st(this,!0,t),Object.keys(t).forEach(i=>{rt(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,s)=>{i=e(i,r,s)}),i}_allControlsDisabled(){for(let 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}};var Sn=B;var S=new A("",{providedIn:"root",factory:()=>ae}),ae="always";function ot(n,t){return[...t.path,n]}function U(n,t,e=ae){De(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),St(n,t),Ot(n,t),Nt(n,t),It(n,t)}function ie(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),se(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function re(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function It(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function De(n,t){let e=nt(n);t.validator!==null?n.setValidators(ke(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=it(n);t.asyncValidator!==null?n.setAsyncValidators(ke(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();re(t._rawValidators,r),re(t._rawAsyncValidators,r)}function se(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=nt(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.validator);s.length!==r.length&&(e=!0,n.setValidators(s))}}if(t.asyncValidator!==null){let r=it(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.asyncValidator);s.length!==r.length&&(e=!0,n.setAsyncValidators(s))}}}let i=()=>{};return re(t._rawValidators,i),re(t._rawAsyncValidators,i),e}function St(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&at(n,t)})}function Nt(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&at(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function at(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Ot(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function lt(n,t){n==null,De(n,t)}function xt(n,t){return se(n,t)}function be(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function Pt(n){return Object.getPrototypeOf(n.constructor)===H}function ut(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function Ae(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(s=>{s.constructor===We?e=s:Pt(s)?i=s:r=s}),r||i||e||null}function Rt(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}var kt={provide:_,useExisting:d(()=>jt)},k=Promise.resolve(),jt=(()=>{class n extends _{callSetDisabledState;get submitted(){return m(this.submittedReactive)}_submitted=w(()=>this.submittedReactive());submittedReactive=M(!1);_directives=new Set;form;ngSubmit=new C;options;constructor(e,i,r){super(),this.callSetDisabledState=r,this.form=new B({},ve(e),ye(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){k.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),U(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){k.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){k.then(()=>{let i=this._findContainer(e.path),r=new B({});lt(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){k.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){k.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),ut(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new te(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1),this.form._events.next(new ne(this.form))}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(i){return new(i||n)(o(y,10),o(L,10),o(S,8))};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){i&1&&V("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[c([kt]),u]})}return n})();function Te(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Be(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var Me=class extends T{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,i){super(Ce(e),Ve(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),oe(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Be(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),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){Te(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Te(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){Be(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}},On=Me,Gt=n=>n instanceof Me;var Tt={provide:v,useExisting:d(()=>Bt)},Ue=Promise.resolve(),Bt=(()=>{class n extends v{_changeDetectorRef;callSetDisabledState;control=new Me;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new C;constructor(e,i,r,s,a,p){super(),this._changeDetectorRef=a,this.callSetDisabledState=p,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Ae(this,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),be(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&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){U(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){Ue.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&he(i);Ue.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?ot(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(o(_,9),o(y,10),o(L,10),o(b,10),o(ce,8),o(S,8))};static \u0275dir=l({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[c([Tt]),u,E]})}return n})();var xn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return n})(),Ut={provide:b,useExisting:d(()=>Ht),multi:!0},Ht=(()=>{class n extends H{writeValue(e){let i=e??"";this.setProperty("value",i)}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&V("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[c([Ut]),u]})}return n})();var Ee=new A(""),Lt={provide:v,useExisting:d(()=>Wt)},Wt=(()=>{class n extends v{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new C;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=Ae(this,r)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&ie(i,this,!1),U(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}be(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&ie(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(i){return new(i||n)(o(y,10),o(L,10),o(b,10),o(Ee,8),o(S,8))};static \u0275dir=l({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[c([Lt]),u,E]})}return n})(),$t={provide:_,useExisting:d(()=>qt)},qt=(()=>{class n extends _{callSetDisabledState;get submitted(){return m(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=w(()=>this._submittedReactive());_submittedReactive=M(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new C;constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(se(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){let i=this.form.get(e.path);return U(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){ie(e.control||null,e,!1),Rt(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),ut(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new te(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0,i={}){this.form.reset(e,i),this._submittedReactive.set(!1),i?.emitEvent!==!1&&this.form._events.next(new ne(this.form))}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(ie(i||null,e),Gt(r)&&(U(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);lt(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&xt(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){De(this.form,this),this._oldForm&&se(this._oldForm,this)}static \u0275fac=function(i){return new(i||n)(o(y,10),o(L,10),o(S,8))};static \u0275dir=l({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&V("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[c([$t]),u,E]})}return n})();var zt={provide:v,useExisting:d(()=>Zt)},Zt=(()=>{class n extends v{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new C;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Ae(this,s)}ngOnChanges(e){this._added||this._setUpControl(),be(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 ot(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(i){return new(i||n)(o(_,13),o(y,10),o(L,10),o(b,10),o(Ee,8))};static \u0275dir=l({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[c([zt]),u,E]})}return n})();var Xt={provide:b,useExisting:d(()=>ct),multi:!0};function dt(n,t){return n==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function Yt(n){return n.split(":")[0]}var ct=(()=>{class n extends H{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;appRefInjector=z(Pe).injector;destroyRef=z(Ne);cdr=z(ce);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,Oe({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(e){this.cdr.markForCheck(),this.value=e;let i=this._getOptionId(e),r=dt(i,e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){let i=Yt(e);return this._optionMap.has(i)?this._optionMap.get(i):e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&V("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[c([Xt]),u]})}return n})(),Pn=(()=>{class n{_element;_renderer;_select;id;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){this._select!=null&&(this._select._optionMap.set(this.id,e),this._setElementValue(dt(this.id,e)),this._select._writeValueAfterRender())}set value(e){this._setElementValue(e),this._select&&this._select._writeValueAfterRender()}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select._writeValueAfterRender())}static \u0275fac=function(i){return new(i||n)(o(N),o(O),o(ct,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),Kt={provide:b,useExisting:d(()=>ht),multi:!0};function He(n,t){return n==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function Jt(n){return n.split(":")[0]}var ht=(()=>{class n extends H{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;writeValue(e){this.value=e;let i;if(Array.isArray(e)){let r=e.map(s=>this._getOptionId(s));i=(s,a)=>{s._setSelected(r.indexOf(a.toString())>-1)}}else i=(r,s)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{let r=[],s=i.selectedOptions;if(s!==void 0){let a=s;for(let p=0;p<a.length;p++){let W=a[p],ue=this._getOptionValue(W.value);r.push(ue)}}else{let a=i.options;for(let p=0;p<a.length;p++){let W=a[p];if(W.selected){let ue=this._getOptionValue(W.value);r.push(ue)}}}this.value=r,e(r)}}_registerOption(e){let i=(this._idCounter++).toString();return this._optionMap.set(i,e),i}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,e))return i;return null}_getOptionValue(e){let i=Jt(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&V("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[c([Kt]),u]})}return n})(),Rn=(()=>{class n{_element;_renderer;_select;id;_value;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){this._select!=null&&(this._value=e,this._setElementValue(He(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(He(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(i){return new(i||n)(o(N),o(O),o(ht,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();function ft(n){return typeof n=="number"?n:parseFloat(n)}var le=(()=>{class n{_validator=Y;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):Y,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,features:[E]})}return n})(),Qt={provide:y,useExisting:d(()=>en),multi:!0},en=(()=>{class n extends le{max;inputName="max";normalizeInput=e=>ft(e);createValidator=e=>qe(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&x("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[c([Qt]),u]})}return n})(),tn={provide:y,useExisting:d(()=>nn),multi:!0},nn=(()=>{class n extends le{min;inputName="min";normalizeInput=e=>ft(e);createValidator=e=>$e(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&x("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[c([tn]),u]})}return n})(),rn={provide:y,useExisting:d(()=>sn),multi:!0};var sn=(()=>{class n extends le{required;inputName="required";normalizeInput=he;createValidator=e=>ze;enabled(e){return e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,r){i&2&&x("required",r._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[c([rn]),u]})}return n})();var on={provide:y,useExisting:d(()=>an),multi:!0},an=(()=>{class n extends le{pattern;inputName="pattern";normalizeInput=e=>e;createValidator=e=>Ze(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&x("pattern",r._enabled?r.pattern:null)},inputs:{pattern:"pattern"},standalone:!1,features:[c([on]),u]})}return n})();var gt=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Z({type:n});static \u0275inj=q({})}return n})(),pe=class extends T{constructor(t,e,i){super(Ce(e),Ve(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){st(this,!1,t),t.forEach((i,r)=>{rt(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let 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}},kn=pe;var jn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:S,useValue:e.callSetDisabledState??ae}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Z({type:n});static \u0275inj=q({imports:[gt]})}return n})(),Gn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Ee,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:S,useValue:e.callSetDisabledState??ae}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Z({type:n});static \u0275inj=q({imports:[gt]})}return n})();export{b as a,mt as b,We as c,Re as d,Fn as e,In as f,B as g,Sn as h,jt as i,Me as j,On as k,Bt as l,xn as m,Ht as n,Wt as o,qt as p,Zt as q,ct as r,Pn as s,Rn as t,en as u,nn as v,sn as w,an as x,kn as y,jn as z,Gn as A};
|
|
1
|
+
import{Bc as c,Ca as E,D as Se,Da as g,Db as xe,Fa as N,Gb as Pe,Hb as x,Pc as m,Qc as w,Wc as ce,Zc as he,a as h,ad as fe,b as f,bc as V,da as $,fa as d,fb as O,gb as o,ha as q,ja as A,la as z,n as we,nb as Z,ob as l,oc as de,q as Fe,qb as u,ub as C,wa as Ne,x as Ie,xb as Oe,za as M}from"./chunk-IOKYXV5M.js";var Le=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(i){return new(i||n)(o(O),o(N))};static \u0275dir=l({type:n})}return n})(),H=(()=>{class n extends Le{static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,features:[u]})}return n})(),b=new A(""),pt={provide:b,useExisting:d(()=>mt),multi:!0},mt=(()=>{class n extends H{writeValue(e){this.setProperty("checked",e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&V("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[c([pt]),u]})}return n})(),_t={provide:b,useExisting:d(()=>We),multi:!0};function vt(){let n=fe()?fe().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var yt=new A(""),We=(()=>{class n extends Le{_compositionMode;_composing=!1;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!vt())}writeValue(e){let i=e??"";this.setProperty("value",i)}_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)}static \u0275fac=function(i){return new(i||n)(o(O),o(N),o(yt,8))};static \u0275dir=l({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&V("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},standalone:!1,features:[c([_t]),u]})}return n})();function me(n){return n==null||_e(n)===0}function _e(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var y=new A(""),L=new A(""),Ct=/^(?=.{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])?)*$/,Re=class{static min(t){return $e(t)}static max(t){return qe(t)}static required(t){return ze(t)}static requiredTrue(t){return Vt(t)}static email(t){return Dt(t)}static minLength(t){return bt(t)}static maxLength(t){return At(t)}static pattern(t){return Ze(t)}static nullValidator(t){return Y()}static compose(t){return et(t)}static composeAsync(t){return tt(t)}};function $e(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function qe(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function ze(n){return me(n.value)?{required:!0}:null}function Vt(n){return n.value===!0?null:{required:!0}}function Dt(n){return me(n.value)||Ct.test(n.value)?null:{email:!0}}function bt(n){return t=>{let e=t.value?.length??_e(t.value);return e===null||e===0?null:e<n?{minlength:{requiredLength:n,actualLength:e}}:null}}function At(n){return t=>{let e=t.value?.length??_e(t.value);return e!==null&&e>n?{maxlength:{requiredLength:n,actualLength:e}}:null}}function Ze(n){if(!n)return Y;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(me(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function Y(n){return null}function Xe(n){return n!=null}function Ye(n){return xe(n)?Fe(n):n}function Ke(n){let t={};return n.forEach(e=>{t=e!=null?h(h({},t),e):t}),Object.keys(t).length===0?null:t}function Je(n,t){return t.map(e=>e(n))}function Mt(n){return!n.validate}function Qe(n){return n.map(t=>Mt(t)?t:e=>t.validate(e))}function et(n){if(!n)return null;let t=n.filter(Xe);return t.length==0?null:function(e){return Ke(Je(e,t))}}function ve(n){return n!=null?et(Qe(n)):null}function tt(n){if(!n)return null;let t=n.filter(Xe);return t.length==0?null:function(e){let i=Je(e,t).map(Ye);return Se(i).pipe(Ie(Ke))}}function ye(n){return n!=null?tt(Qe(n)):null}function ke(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function nt(n){return n._rawValidators}function it(n){return n._rawAsyncValidators}function ge(n){return n?Array.isArray(n)?n:[n]:[]}function K(n,t){return Array.isArray(n)?n.includes(t):n===t}function je(n,t){let e=ge(t);return ge(n).forEach(r=>{K(e,r)||e.push(r)}),e}function Ge(n,t){return ge(t).filter(e=>!K(n,e))}var J=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=ve(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=ye(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},_=class extends J{name;get formDirective(){return null}get path(){return null}},v=class extends J{_parent=null;name=null;valueAccessor=null},Q=class{_cd;constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},Et={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},wn=f(h({},Et),{"[class.ng-submitted]":"isSubmitted"}),Fn=(()=>{class n extends Q{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(v,2))};static \u0275dir=l({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&de("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[u]})}return n})(),In=(()=>{class n extends Q{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(_,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&de("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},standalone:!1,features:[u]})}return n})();var P="VALID",X="INVALID",F="PENDING",R="DISABLED",D=class{},ee=class extends D{value;source;constructor(t,e){super(),this.value=t,this.source=e}},j=class extends D{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},G=class extends D{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},I=class extends D{status;source;constructor(t,e){super(),this.status=t,this.source=e}},te=class extends D{source;constructor(t){super(),this.source=t}},ne=class extends D{source;constructor(t){super(),this.source=t}};function Ce(n){return(oe(n)?n.validators:n)||null}function wt(n){return Array.isArray(n)?ve(n):n||null}function Ve(n,t){return(oe(t)?t.asyncValidators:n)||null}function Ft(n){return Array.isArray(n)?ye(n):n||null}function oe(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function rt(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new $(1e3,"");if(!i[e])throw new $(1001,"")}function st(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new $(1002,"")})}var T=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){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 status(){return m(this.statusReactive)}set status(t){m(()=>this.statusReactive.set(t))}_status=w(()=>this.statusReactive());statusReactive=M(void 0);get valid(){return this.status===P}get invalid(){return this.status===X}get pending(){return this.status==F}get disabled(){return this.status===R}get enabled(){return this.status!==R}errors;get pristine(){return m(this.pristineReactive)}set pristine(t){m(()=>this.pristineReactive.set(t))}_pristine=w(()=>this.pristineReactive());pristineReactive=M(!0);get dirty(){return!this.pristine}get touched(){return m(this.touchedReactive)}set touched(t){m(()=>this.touchedReactive.set(t))}_touched=w(()=>this.touchedReactive());touchedReactive=M(!1);get untouched(){return!this.touched}_events=new we;events=this._events.asObservable();valueChanges;statusChanges;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(je(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(je(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Ge(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Ge(t,this._rawAsyncValidators))}hasValidator(t){return K(this._rawValidators,t)}hasAsyncValidator(t){return K(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(f(h({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new G(!0,i))}markAllAsDirty(t={}){this.markAsDirty({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(t))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,i),e&&t.emitEvent!==!1&&this._events.next(new G(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(f(h({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new j(!1,i))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,i),e&&t.emitEvent!==!1&&this._events.next(new j(!0,i))}markAsPending(t={}){this.status=F;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new I(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(f(h({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=R,this.errors=null,this._forEachChild(r=>{r.disable(f(h({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new ee(this.value,i)),this._events.next(new I(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(f(h({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=P,this._forEachChild(i=>{i.enable(f(h({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(f(h({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===P||this.status===F)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new ee(this.value,e)),this._events.next(new I(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(f(h({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?R:P}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=F,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:t!==!1};let i=Ye(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new I(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new C,this.statusChanges=new C}_calculateStatus(){return this._allControlsDisabled()?R:this.errors?X:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(F)?F:this._anyControlsHaveStatus(X)?X:P}_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,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new j(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new G(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){oe(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=wt(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=Ft(this._rawAsyncValidators)}},B=class extends T{constructor(t,e,i){super(Ce(e),Ve(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){st(this,!0,t),Object.keys(t).forEach(i=>{rt(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,s)=>{i=e(i,r,s)}),i}_allControlsDisabled(){for(let 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}};var Sn=B;var S=new A("",{providedIn:"root",factory:()=>ae}),ae="always";function ot(n,t){return[...t.path,n]}function U(n,t,e=ae){De(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),St(n,t),Ot(n,t),Nt(n,t),It(n,t)}function ie(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),se(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function re(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function It(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function De(n,t){let e=nt(n);t.validator!==null?n.setValidators(ke(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=it(n);t.asyncValidator!==null?n.setAsyncValidators(ke(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();re(t._rawValidators,r),re(t._rawAsyncValidators,r)}function se(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=nt(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.validator);s.length!==r.length&&(e=!0,n.setValidators(s))}}if(t.asyncValidator!==null){let r=it(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.asyncValidator);s.length!==r.length&&(e=!0,n.setAsyncValidators(s))}}}let i=()=>{};return re(t._rawValidators,i),re(t._rawAsyncValidators,i),e}function St(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&at(n,t)})}function Nt(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&at(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function at(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Ot(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function lt(n,t){n==null,De(n,t)}function xt(n,t){return se(n,t)}function be(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function Pt(n){return Object.getPrototypeOf(n.constructor)===H}function ut(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function Ae(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(s=>{s.constructor===We?e=s:Pt(s)?i=s:r=s}),r||i||e||null}function Rt(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}var kt={provide:_,useExisting:d(()=>jt)},k=Promise.resolve(),jt=(()=>{class n extends _{callSetDisabledState;get submitted(){return m(this.submittedReactive)}_submitted=w(()=>this.submittedReactive());submittedReactive=M(!1);_directives=new Set;form;ngSubmit=new C;options;constructor(e,i,r){super(),this.callSetDisabledState=r,this.form=new B({},ve(e),ye(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){k.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),U(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){k.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){k.then(()=>{let i=this._findContainer(e.path),r=new B({});lt(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){k.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){k.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),ut(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new te(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1),this.form._events.next(new ne(this.form))}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(i){return new(i||n)(o(y,10),o(L,10),o(S,8))};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){i&1&&V("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[c([kt]),u]})}return n})();function Te(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Be(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var Me=class extends T{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,i){super(Ce(e),Ve(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),oe(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Be(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),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){Te(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Te(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){Be(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}},On=Me,Gt=n=>n instanceof Me;var Tt={provide:v,useExisting:d(()=>Bt)},Ue=Promise.resolve(),Bt=(()=>{class n extends v{_changeDetectorRef;callSetDisabledState;control=new Me;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new C;constructor(e,i,r,s,a,p){super(),this._changeDetectorRef=a,this.callSetDisabledState=p,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Ae(this,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),be(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&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){U(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){Ue.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&he(i);Ue.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?ot(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(o(_,9),o(y,10),o(L,10),o(b,10),o(ce,8),o(S,8))};static \u0275dir=l({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[c([Tt]),u,E]})}return n})();var xn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return n})(),Ut={provide:b,useExisting:d(()=>Ht),multi:!0},Ht=(()=>{class n extends H{writeValue(e){let i=e??"";this.setProperty("value",i)}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&V("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[c([Ut]),u]})}return n})();var Ee=new A(""),Lt={provide:v,useExisting:d(()=>Wt)},Wt=(()=>{class n extends v{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new C;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=Ae(this,r)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&ie(i,this,!1),U(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}be(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&ie(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(i){return new(i||n)(o(y,10),o(L,10),o(b,10),o(Ee,8),o(S,8))};static \u0275dir=l({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[c([Lt]),u,E]})}return n})(),$t={provide:_,useExisting:d(()=>qt)},qt=(()=>{class n extends _{callSetDisabledState;get submitted(){return m(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=w(()=>this._submittedReactive());_submittedReactive=M(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new C;constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(se(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){let i=this.form.get(e.path);return U(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){ie(e.control||null,e,!1),Rt(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),ut(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new te(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0,i={}){this.form.reset(e,i),this._submittedReactive.set(!1),i?.emitEvent!==!1&&this.form._events.next(new ne(this.form))}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(ie(i||null,e),Gt(r)&&(U(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);lt(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&xt(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){De(this.form,this),this._oldForm&&se(this._oldForm,this)}static \u0275fac=function(i){return new(i||n)(o(y,10),o(L,10),o(S,8))};static \u0275dir=l({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&V("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[c([$t]),u,E]})}return n})();var zt={provide:v,useExisting:d(()=>Zt)},Zt=(()=>{class n extends v{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new C;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Ae(this,s)}ngOnChanges(e){this._added||this._setUpControl(),be(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 ot(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(i){return new(i||n)(o(_,13),o(y,10),o(L,10),o(b,10),o(Ee,8))};static \u0275dir=l({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[c([zt]),u,E]})}return n})();var Xt={provide:b,useExisting:d(()=>ct),multi:!0};function dt(n,t){return n==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function Yt(n){return n.split(":")[0]}var ct=(()=>{class n extends H{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;appRefInjector=z(Pe).injector;destroyRef=z(Ne);cdr=z(ce);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,Oe({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(e){this.cdr.markForCheck(),this.value=e;let i=this._getOptionId(e),r=dt(i,e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){let i=Yt(e);return this._optionMap.has(i)?this._optionMap.get(i):e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&V("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[c([Xt]),u]})}return n})(),Pn=(()=>{class n{_element;_renderer;_select;id;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){this._select!=null&&(this._select._optionMap.set(this.id,e),this._setElementValue(dt(this.id,e)),this._select._writeValueAfterRender())}set value(e){this._setElementValue(e),this._select&&this._select._writeValueAfterRender()}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select._writeValueAfterRender())}static \u0275fac=function(i){return new(i||n)(o(N),o(O),o(ct,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),Kt={provide:b,useExisting:d(()=>ht),multi:!0};function He(n,t){return n==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function Jt(n){return n.split(":")[0]}var ht=(()=>{class n extends H{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;writeValue(e){this.value=e;let i;if(Array.isArray(e)){let r=e.map(s=>this._getOptionId(s));i=(s,a)=>{s._setSelected(r.indexOf(a.toString())>-1)}}else i=(r,s)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{let r=[],s=i.selectedOptions;if(s!==void 0){let a=s;for(let p=0;p<a.length;p++){let W=a[p],ue=this._getOptionValue(W.value);r.push(ue)}}else{let a=i.options;for(let p=0;p<a.length;p++){let W=a[p];if(W.selected){let ue=this._getOptionValue(W.value);r.push(ue)}}}this.value=r,e(r)}}_registerOption(e){let i=(this._idCounter++).toString();return this._optionMap.set(i,e),i}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,e))return i;return null}_getOptionValue(e){let i=Jt(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&V("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[c([Kt]),u]})}return n})(),Rn=(()=>{class n{_element;_renderer;_select;id;_value;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){this._select!=null&&(this._value=e,this._setElementValue(He(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(He(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(i){return new(i||n)(o(N),o(O),o(ht,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();function ft(n){return typeof n=="number"?n:parseFloat(n)}var le=(()=>{class n{_validator=Y;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):Y,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,features:[E]})}return n})(),Qt={provide:y,useExisting:d(()=>en),multi:!0},en=(()=>{class n extends le{max;inputName="max";normalizeInput=e=>ft(e);createValidator=e=>qe(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&x("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[c([Qt]),u]})}return n})(),tn={provide:y,useExisting:d(()=>nn),multi:!0},nn=(()=>{class n extends le{min;inputName="min";normalizeInput=e=>ft(e);createValidator=e=>$e(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&x("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[c([tn]),u]})}return n})(),rn={provide:y,useExisting:d(()=>sn),multi:!0};var sn=(()=>{class n extends le{required;inputName="required";normalizeInput=he;createValidator=e=>ze;enabled(e){return e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,r){i&2&&x("required",r._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[c([rn]),u]})}return n})();var on={provide:y,useExisting:d(()=>an),multi:!0},an=(()=>{class n extends le{pattern;inputName="pattern";normalizeInput=e=>e;createValidator=e=>Ze(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&x("pattern",r._enabled?r.pattern:null)},inputs:{pattern:"pattern"},standalone:!1,features:[c([on]),u]})}return n})();var gt=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Z({type:n});static \u0275inj=q({})}return n})(),pe=class extends T{constructor(t,e,i){super(Ce(e),Ve(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){st(this,!1,t),t.forEach((i,r)=>{rt(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let 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}},kn=pe;var jn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:S,useValue:e.callSetDisabledState??ae}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Z({type:n});static \u0275inj=q({imports:[gt]})}return n})(),Gn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Ee,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:S,useValue:e.callSetDisabledState??ae}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Z({type:n});static \u0275inj=q({imports:[gt]})}return n})();export{b as a,mt as b,We as c,Re as d,Fn as e,In as f,B as g,Sn as h,jt as i,Me as j,On as k,Bt as l,xn as m,Ht as n,Wt as o,qt as p,Zt as q,ct as r,Pn as s,Rn as t,en as u,nn as v,sn as w,an as x,kn as y,jn as z,Gn as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
1
|
+
import{a as l}from"./chunk-GS72D2DZ.js";import{a as m}from"./chunk-ZUTM7S4U.js";import{n as s}from"./chunk-IWFKJHPR.js";import{b as o}from"./chunk-ZY5SUCRL.js";import{a as i}from"./chunk-KZKL7DGI.js";import{ga as r,la as n}from"./chunk-IOKYXV5M.js";var I=(()=>{class e{$terminal=n(l);$settings=n(o);$modal=n(s);$translate=n(i);handleBeforeUnload(t){if(!this.$settings.env.terminal?.persistence&&!this.$settings.env.terminal?.hideWarning&&this.$terminal.hasActiveSession()&&this.$terminal.hasUserTypedInSession()){let a=this.$translate.instant("platform.terminal.terminate_unload");return t.preventDefault(),t.returnValue=a,a}}canDeactivate(){if(this.$settings.env.terminal?.persistence||this.$settings.env.terminal?.hideWarning||!this.$terminal.hasActiveSession()||!this.$terminal.hasUserTypedInSession())return!0;let t=this.$modal.open(m,{size:"lg",backdrop:"static"});return t.componentInstance.title=this.$translate.instant("platform.terminal.terminate_title"),t.componentInstance.message=this.$translate.instant("platform.terminal.terminate_message_1"),t.componentInstance.message2=this.$translate.instant("platform.terminal.terminate_message_2"),t.componentInstance.message3=this.$translate.instant("common.phrases.are_you_sure"),t.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_continue"),t.componentInstance.confirmButtonClass="btn-primary",t.componentInstance.faIconClass="fas fa-exclamation-triangle text-warning",t.result.then(()=>!0).catch(()=>!1)}static \u0275fac=function(a){return new(a||e)};static \u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{I as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b}from"./chunk-
|
|
1
|
+
import{a as b}from"./chunk-QSP4KI3N.js";import"./chunk-BYDZXXU7.js";import{d as k}from"./chunk-DFFTJVRY.js";import{b as S}from"./chunk-ZY5SUCRL.js";import{k as T,n as w}from"./chunk-JCCQ75XM.js";import{a as C,b as $}from"./chunk-KZKL7DGI.js";import"./chunk-OA7Y3E5A.js";import{$b as E,Dc as g,Ib as d,Jb as f,Jc as m,Kc as c,Lc as y,Sb as r,Tb as i,Ub as l,Xa as x,ab as n,dc as h,la as o,mb as _,qc as a,rc as s}from"./chunk-IOKYXV5M.js";var I=t=>({command:t});function D(t,u){if(t&1&&(r(0,"div",7),a(1),i()),t&2){let e=h();n(),s(e.error)}}function R(t,u){t&1&&(r(0,"p",9),a(1),m(2,"translate"),i(),r(3,"div",10)(4,"div",11),l(5,"i",12),i()()),t&2&&(n(),s(c(2,1,"restart.please_wait_while_server_restarts")))}function B(t,u){if(t&1&&(r(0,"div",8)(1,"p"),a(2),m(3,"translate"),i(),l(4,"p",13),m(5,"translate"),i()),t&2){let e=h();n(2),s(c(3,2,"platform.docker.server_long_time")),n(2),E("innerHTML",y(5,4,"platform.docker.run_with_restart",g(7,I,e.command)),x)}}var U=(()=>{class t{$api=o(w);$router=o(k);$settings=o(S);$toastr=o(T);$translate=o(C);$ws=o(b);checkTimeout;checkDelay;io;resp={};timeout=!1;error=!1;command='<span class="font-monospace">--restart=always</span>';ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$api.put("/platform-tools/docker/restart-container",{}).subscribe({next:e=>{this.resp=e,this.checkIfServerUp()},error:e=>{this.error=this.$translate.instant("restart.toast_server_restart_error"),console.error(e),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{(e.status==="up"||e.status==="pending")&&(this.$toastr.success(this.$translate.instant("platform.docker.container_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},1e4),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("restart.toast_server_restart_timeout"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},6e4)}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=_({type:t,selectors:[["ng-component"]],decls:14,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fab","fa-fw","fa-docker",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[1,"fas","fa-fw","fa-spinner","fa-spin"],[1,"grey-text","mb-0",3,"innerHTML"]],template:function(p,v){p&1&&(r(0,"div",0)(1,"h3",1),a(2),m(3,"translate"),i()(),r(4,"div",2)(5,"div",3),l(6,"i",4),i(),r(7,"div",5)(8,"h4",6),a(9),m(10,"translate"),i(),d(11,D,2,1,"div",7)(12,R,6,3),d(13,B,6,9,"div",8),i()()),p&2&&(n(2),s(c(3,4,"menu.restart.title")),n(7),s(c(10,6,"platform.docker.title_restarting")),n(2),f(v.error?11:12),n(2),f(v.timeout?13:-1))},dependencies:[$],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{U as ContainerRestartComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as E}from"./chunk-
|
|
1
|
+
import{a as E}from"./chunk-AC47AP7G.js";import{a as S}from"./chunk-GS72D2DZ.js";import"./chunk-FVKMBZOU.js";import"./chunk-ZUTM7S4U.js";import"./chunk-IWFKJHPR.js";import"./chunk-7EQFLCW4.js";import"./chunk-QSP4KI3N.js";import"./chunk-BYDZXXU7.js";import{b as C}from"./chunk-ZY5SUCRL.js";import"./chunk-JCCQ75XM.js";import{b as w}from"./chunk-KZKL7DGI.js";import"./chunk-OA7Y3E5A.js";import{$a as a,Jc as y,Kc as b,Sb as m,Tb as l,Ub as h,Uc as $,ab as c,bc as v,kc as f,la as o,lc as p,mb as u,n as d,qc as g,rc as T}from"./chunk-IOKYXV5M.js";var _=["terminaloutput"],A=(()=>{class r{$terminal=o(S);$settings=o(C);$navigationGuard=o(E);resizeEvent=new d;termTarget=$("terminaloutput");onWindowResize(){this.resizeEvent.next(void 0)}onBeforeUnload(t){return this.$navigationGuard.handleBeforeUnload(t)}onWindowFocus(){this.activateTerminal()}onClick(){this.activateTerminal()}activateTerminal(){this.$terminal.isTerminalReady()&&this.$terminal.term&&this.$terminal.term.focus()}ngOnInit(){window.document.querySelector("body").classList.add("bg-black"),this.$terminal.isTerminalReady()&&this.$terminal.destroyTerminal(),this.$settings.env.terminal?.persistence&&this.$terminal.hasActiveSession()?this.$terminal.reconnectTerminal(this.termTarget(),{},this.resizeEvent):(!this.$settings.env.terminal?.persistence&&this.$terminal.hasActiveSession()&&this.$terminal.destroyPersistentSession(),this.$terminal.startTerminal(this.termTarget(),{},this.resizeEvent)),setTimeout(()=>{this.activateTerminal()},100)}ngAfterViewInit(){document.addEventListener("visibilitychange",this.onVisibilityChange.bind(this))}onVisibilityChange(){!document.hidden&&this.$terminal.isTerminalReady()&&setTimeout(()=>{this.activateTerminal()},100)}canDeactivate(){return this.$navigationGuard.canDeactivate()}ngOnDestroy(){document.removeEventListener("visibilitychange",this.onVisibilityChange.bind(this)),window.document.querySelector("body").classList.remove("bg-black"),this.$settings.env.terminal?.persistence?this.$terminal.detachTerminal():this.$terminal.destroyPersistentSession()}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=u({type:r,selectors:[["ng-component"]],viewQuery:function(e,i){e&1&&f(i.termTarget,_,5),e&2&&p()},hostBindings:function(e,i){e&1&&v("resize",function(n){return i.onWindowResize(n)},a)("beforeunload",function(n){return i.onBeforeUnload(n)},a)("focus",function(n){return i.onWindowFocus(n)},a)("click",function(n){return i.onClick(n)})},decls:8,vars:3,consts:[["terminaloutput",""],[1,"row","mb-3"],[1,"col-12"],[1,"primary-text","m-0"],[1,"flex-column","d-flex","align-items-stretch","adjust-for-mobile"],["id","docker-terminal",1,"align-self-end","w-100","h-100","mb-1"]],template:function(e,i){e&1&&(m(0,"div",1)(1,"div",2)(2,"h3",3),g(3),y(4,"translate"),l()()(),m(5,"div",4),h(6,"div",5,0),l()),e&2&&(c(3),T(b(4,1,"menu.linux.label_terminal")))},dependencies:[w],encapsulation:2})}return r})();export{A as TerminalComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as J}from"./chunk-
|
|
1
|
+
import{m as J}from"./chunk-IWFKJHPR.js";import{e as O,l as W,r as z,s as q,t as G,z as H}from"./chunk-7EQFLCW4.js";import{d as Y}from"./chunk-DFFTJVRY.js";import{k as X,n as Z}from"./chunk-JCCQ75XM.js";import{a as K,b as Q}from"./chunk-KZKL7DGI.js";import{Ec as N,Fc as P,Hb as A,Ib as _,Jb as u,Jc as m,Kc as p,Lb as k,Mb as E,Nb as $,Ob as C,Pb as o,Qb as a,Rb as w,_b as B,a as T,ab as s,b as R,bc as b,dc as d,h as M,kd as j,la as y,mb as D,qc as c,ra as f,rc as g,sa as v,sc as h,tc as V,w as S,xc as F,yc as U,zc as L}from"./chunk-IOKYXV5M.js";var te=(t,l)=>({"btn-danger":t,"btn-elegant":l}),ie=(t,l,e)=>({"fa-trash":t,"fa-undo":l,"fa-spinner fa-pulse":e});function ne(t,l){t&1&&(o(0,"div",12),w(1,"i",13),a(),o(2,"p",14),c(3),m(4,"translate"),a()),t&2&&(s(3),g(p(4,1,"reset.no_accessories")))}function se(t,l){if(t&1&&(o(0,"option",24),c(1),a()),t&2){let e=l.$implicit;C("value",e._id),s(),V("",e.name," (",e._username,")")}}function oe(t,l){if(t&1){let e=B();o(0,"li",20),c(1),m(2,"translate"),a(),o(3,"li",18)(4,"label",21),c(5),m(6,"translate"),a(),o(7,"div",22)(8,"select",23),L("ngModelChange",function(i){f(e);let r=d(2);return U(r.selectedBridge,i)||(r.selectedBridge=i),v(i)}),b("change",function(i){f(e);let r=d(2);return v(r.onBridgeChange(i.target.value))}),E(9,se,2,3,"option",24,k),a()()()}if(t&2){let e=d(2);s(),g(p(2,3,"form.label.changes_kept")),s(4),g(p(6,5,"reset.accessory_ind.bridge")),s(3),F("ngModel",e.selectedBridge),s(),$(e.pairings)}}function ae(t,l){if(t&1&&(o(0,"li",18)(1,"label",25),c(2),m(3,"translate"),a(),o(4,"div",26),c(5),a()()),t&2){let e=d(2);s(2),g(p(3,2,"reset.accessory_ind.bridge")),s(3),h(" ",e.getCurrentlySelectedBridge()," ")}}function re(t,l){if(t&1){let e=B();o(0,"li",19)(1,"span"),c(2),w(3,"br"),o(4,"small")(5,"span",27),c(6),a()()(),o(7,"button",28),m(8,"translate"),b("click",function(){let i=f(e).$implicit,r=d(2);return v(r.toggleList(i.UUID,i.$cacheFile))}),w(9,"i",29),a()()}if(t&2){let e=l.$implicit,n=d(2);s(2),h(" ",e.displayName),s(4),g(e.UUID),s(),C("disabled",n.clicked)("ngClass",N(8,te,!n.isInList(e.UUID,e.$cacheFile),n.isInList(e.UUID,e.$cacheFile))),A("aria-label",p(8,6,"form.button_delete")),s(2),C("ngClass",P(11,ie,!n.isInList(e.UUID,e.$cacheFile),n.isInList(e.UUID,e.$cacheFile)&&!n.clicked,n.isInList(e.UUID,e.$cacheFile)&&n.clicked))}}function le(t,l){if(t&1&&(o(0,"div",12),w(1,"i",15),a(),o(2,"ul",16)(3,"li"),c(4),m(5,"translate"),a(),o(6,"li"),c(7),m(8,"translate"),a(),o(9,"li"),c(10),m(11,"translate"),a()(),o(12,"ul",17),_(13,oe,11,7),_(14,ae,6,4,"li",18),E(15,re,10,15,"li",19,k),a()),t&2){let e=d();s(4),g(p(5,5,"reset.accessory_ind.list_1")),s(3),g(p(8,7,"reset.accessory_ind.list_2")),s(3),g(p(11,9,"reset.accessory_ind.list_3")),s(3),u(e.pairings.length>1?13:-1),s(),u(e.pairings.length===1?14:-1),s(),$(e.selectedBridgeAccessories)}}function ce(t,l){if(t&1){let e=B();o(0,"button",30),b("click",function(){f(e);let i=d();return v(i.dismissModal())}),c(1),m(2,"translate"),a()}if(t&2){let e=d();C("disabled",e.clicked),s(),h(" ",p(2,2,"form.button_close")," ")}}function de(t,l){if(t&1){let e=B();o(0,"button",31),b("click",function(){f(e);let i=d();return v(i.dismissModal())}),c(1),m(2,"translate"),a()}t&2&&(s(),h(" ",p(2,1,"form.button_close")," "))}function me(t,l){if(t&1&&c(0),t&2){let e=d(3);h(" (",e.toDelete.length,") ")}}function pe(t,l){if(t&1&&(c(0),m(1,"translate"),_(2,me,1,1)),t&2){let e=d(2);h(" ",p(1,2,"form.button_remove")," "),s(2),u(e.toDelete.length>0?2:-1)}}function _e(t,l){t&1&&w(0,"i",33)}function ue(t,l){if(t&1){let e=B();o(0,"button",32),b("click",function(){f(e);let i=d();return v(i.removeAccessories())}),_(1,pe,3,4),_(2,_e,1,0,"i",33),a()}if(t&2){let e=d();C("disabled",!e.toDelete.length||e.clicked),s(),u(e.clicked?-1:1),s(),u(e.clicked?2:-1)}}var ke=(()=>{class t{$activeModal=y(J);$api=y(Z);$router=y(Y);$toastr=y(X);$translate=y(K);selectedBridge="";pairings=[];clicked=!1;selectedBridgeAccessories=[];accessoriesExist=!1;toDelete=[];ngOnInit(){this.loadCachedAccessories()}onBridgeChange(e){this.selectedBridge=e,this.selectedBridgeAccessories=this.pairings.find(n=>n._id===this.selectedBridge)?.accessories}getCurrentlySelectedBridge(){let e=this.pairings.find(n=>n._id===this.selectedBridge);return`${e.name} - ${e._username}`}toggleList(e,n){this.toDelete.some(i=>i.uuid===e&&i.cacheFile===n)?this.toDelete=this.toDelete.filter(i=>i.uuid!==e||i.cacheFile!==n):this.toDelete.push({cacheFile:n,uuid:e})}isInList(e,n){return this.toDelete.some(i=>i.uuid===e&&i.cacheFile===n)}removeAccessories(){return this.clicked=!0,this.$api.delete("/server/cached-accessories",{body:this.toDelete}).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("reset.accessory_ind.done"),this.$translate.instant("toast.title_success")),this.$activeModal.close(),this.$router.navigate(["/restart"],{queryParams:{restarting:!0}})},error:e=>{this.clicked=!1,console.error(e),this.$toastr.error(this.$translate.instant("reset.accessory_ind.fail"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadCachedAccessories(){return M(this,null,function*(){try{let[e,n]=yield Promise.all([S(this.$api.get("/server/cached-accessories")),S(this.$api.get("/server/pairings"))]),i=new Map(n.map(r=>[r._id,R(T({},r),{accessories:[]})]));e.sort((r,x)=>r.displayName.localeCompare(x.displayName)).forEach(r=>{let x=n.find(ee=>ee._main),I=r.$cacheFile?.split(".")?.[1]||x._id;(!this.selectedBridge||this.selectedBridge===I)&&(i.has(I)||i.set(I,{_id:I,_username:I.match(/.{1,2}/g).join(":"),name:this.$translate.instant("reset.accessory_ind.unknown"),accessories:[]}),i.get(I).accessories.push(r))}),this.pairings=Array.from(i.values()).filter(r=>r.accessories.length>0).sort((r,x)=>r._main&&!x._main?-1:!r._main&&x._main?1:r.name.localeCompare(x.name)),this.selectedBridge=this.selectedBridge||this.pairings[0]?._id,this.selectedBridge&&(this.accessoriesExist=!0,this.selectedBridgeAccessories=this.pairings[0].accessories)}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("reset.error_message"),this.$translate.instant("toast.title_error")),this.$activeModal.close()}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=D({type:t,selectors:[["ng-component"]],inputs:{selectedBridge:"selectedBridge"},decls:17,vars:12,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"disabled"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"disabled"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-circle-check","primary-text",2,"font-size","75px"],[1,"mb-0","text-center"],[1,"fas","fa-fw","fa-network-wired","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"list-group-item","text-center","grey-text","small"],["for","bridgeSelect",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["id","bridgeSelect",1,"custom-select",3,"ngModelChange","change","ngModel"],[3,"value"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50","grey-text","font-monospace"],[1,"font-monospace","grey-text"],[1,"btn","btn-danger","m-0","ms-3",3,"click","disabled","ngClass"],[1,"fas","fa-fw",3,"ngClass"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1)(2,"h5",2),c(3),m(4,"translate"),a(),o(5,"button",3),m(6,"translate"),b("click",function(){return i.dismissModal()}),a()(),o(7,"div",4),_(8,ne,5,3),_(9,le,17,11),a(),o(10,"div",5)(11,"div",6),_(12,ce,3,4,"button",7),a(),o(13,"div",8),_(14,de,3,3,"button",9),a(),o(15,"div",10),_(16,ue,3,3,"button",11),a()()()),n&2&&(s(3),g(p(4,8,"reset.accessory_ind.title")),s(2),C("disabled",i.clicked),A("aria-label",p(6,10,"form.button_close")),s(3),u(i.accessoriesExist?-1:8),s(),u(i.accessoriesExist?9:-1),s(3),u(i.accessoriesExist?12:-1),s(2),u(i.accessoriesExist?-1:14),s(2),u(i.accessoriesExist?16:-1))},dependencies:[j,H,q,G,z,O,W,Q],encapsulation:2})}return t})();export{ke as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _,b as D}from"./chunk-
|
|
1
|
+
import{a as _,b as D}from"./chunk-ZY5SUCRL.js";import{m as c,n as S}from"./chunk-JCCQ75XM.js";import{f as x}from"./chunk-OA7Y3E5A.js";import{C as v,g as O,ga as h,h as a,ha as E,ja as y,ka as l,la as f,nb as I,r as p,va as j,w as d,x as T,z as w}from"./chunk-IOKYXV5M.js";var g=new y("JWT_OPTIONS"),m=(()=>{class r{constructor(e=null){this.tokenGetter=e&&e.tokenGetter||function(){}}urlBase64Decode(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:{t+="==";break}case 3:{t+="=";break}default:throw new Error("Illegal base64url string!")}return this.b64DecodeUnicode(t)}b64decode(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o="";if(e=String(e).replace(/=+$/,""),e.length%4===1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(let i=0,s,n,b=0;n=e.charAt(b++);~n&&(s=i%4?s*64+n:n,i++%4)?o+=String.fromCharCode(255&s>>(-2*i&6)):0)n=t.indexOf(n);return o}b64DecodeUnicode(e){return decodeURIComponent(Array.prototype.map.call(this.b64decode(e),t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join(""))}decodeToken(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._decodeToken(t)):this._decodeToken(e)}_decodeToken(e){if(!e||e==="")return null;let t=e.split(".");if(t.length!==3)throw new Error("The inspected token doesn't appear to be a JWT. Check to make sure it has three parts and see https://jwt.io for more.");let o=this.urlBase64Decode(t[1]);if(!o)throw new Error("Cannot decode the token.");return JSON.parse(o)}getTokenExpirationDate(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._getTokenExpirationDate(t)):this._getTokenExpirationDate(e)}_getTokenExpirationDate(e){let t;if(t=this.decodeToken(e),!t||!t.hasOwnProperty("exp"))return null;let o=new Date(0);return o.setUTCSeconds(t.exp),o}isTokenExpired(e=this.tokenGetter(),t){return e instanceof Promise?e.then(o=>this._isTokenExpired(o,t)):this._isTokenExpired(e,t)}_isTokenExpired(e,t){if(!e||e==="")return!0;let o=this.getTokenExpirationDate(e);return t=t||0,o===null?!1:!(o.valueOf()>new Date().valueOf()+t*1e3)}getAuthScheme(e,t){return typeof e=="function"?e(t):e}}return r.\u0275fac=function(e){return new(e||r)(l(g))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),$=r=>r instanceof Promise?v(()=>r):p(r),R=(()=>{class r{constructor(e,t,o){this.jwtHelper=t,this.document=o,this.standardPorts=["80","443"],this.tokenGetter=e.tokenGetter,this.headerName=e.headerName||"Authorization",this.authScheme=e.authScheme||e.authScheme===""?e.authScheme:"Bearer ",this.allowedDomains=e.allowedDomains||[],this.disallowedRoutes=e.disallowedRoutes||[],this.throwNoTokenError=e.throwNoTokenError||!1,this.skipWhenExpired=e.skipWhenExpired}isAllowedDomain(e){let t=new URL(e.url,this.document.location.origin);if(t.host===this.document.location.host)return!0;let o=`${t.hostname}${t.port&&!this.standardPorts.includes(t.port)?":"+t.port:""}`;return this.allowedDomains.findIndex(i=>typeof i=="string"?i===o:i instanceof RegExp?i.test(o):!1)>-1}isDisallowedRoute(e){let t=new URL(e.url,this.document.location.origin);return this.disallowedRoutes.findIndex(o=>{if(typeof o=="string"){let i=new URL(o,this.document.location.origin);return i.hostname===t.hostname&&i.pathname===t.pathname}return o instanceof RegExp?o.test(e.url):!1})>-1}handleInterception(e,t,o){let i=this.jwtHelper.getAuthScheme(this.authScheme,t);if(!e&&this.throwNoTokenError)throw new Error("Could not get token from tokenGetter function.");let s=p(!1);return this.skipWhenExpired&&(s=e?$(this.jwtHelper.isTokenExpired(e)):p(!0)),e?s.pipe(T(n=>n&&this.skipWhenExpired?t.clone():t.clone({setHeaders:{[this.headerName]:`${i}${e}`}})),w(n=>o.handle(n))):o.handle(t)}intercept(e,t){if(!this.isAllowedDomain(e)||this.isDisallowedRoute(e))return t.handle(e);let o=this.tokenGetter(e);return $(o).pipe(w(i=>this.handleInterception(i,e,t)))}}return r.\u0275fac=function(e){return new(e||r)(l(g),l(m),l(j))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),F=(()=>{class r{constructor(e){if(e)throw new Error("JwtModule is already loaded. It should only be imported in your application's main module.")}static forRoot(e){return{ngModule:r,providers:[{provide:x,useClass:R,multi:!0},e.jwtOptionsProvider||{provide:g,useValue:e.config},m]}}}return r.\u0275fac=function(e){return new(e||r)(l(r,12))},r.\u0275mod=I({type:r}),r.\u0275inj=E({}),r})();var k=O(_(),1);var q=(()=>{class r{$api=f(S);$jwtHelper=f(m);$settings=f(D);token;user={};logoutTimer;constructor(){this.loadToken()}login(e){return a(this,null,function*(){let t=yield d(this.$api.post("/auth/login",e));if(!this.validateToken(t.access_token))throw new Error("Invalid username or password.");window.localStorage.setItem(c.jwt.tokenKey,t.access_token),yield this.$settings.getAppSettings()})}noauth(){return a(this,null,function*(){let e=yield d(this.$api.post("/auth/noauth",{}));if(this.validateToken(e.access_token))window.localStorage.setItem(c.jwt.tokenKey,e.access_token),yield this.$settings.getAppSettings();else throw new Error("Invalid username or password.")})}logout(){this.user=null,this.token=null,window.localStorage.removeItem(c.jwt.tokenKey),window.location.reload()}loadToken(){return a(this,null,function*(){this.$settings.settingsLoaded||(yield d(this.$settings.onSettingsLoaded));let e=window.localStorage.getItem(c.jwt.tokenKey);e&&this.validateToken(e)})}checkToken(){return a(this,null,function*(){try{return yield d(this.$api.get("/auth/check"))}catch(e){e.status===401&&(console.error("Current token is not valid"),this.logout())}})}isLoggedIn(){return this.$settings.env.instanceId!==this.user.instanceId?(console.error("Token does not match instance"),!1):this.user&&this.token&&!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)}validateToken(e){try{return this.$jwtHelper.isTokenExpired(e,this.$settings.serverTimeOffset)&&this.logout(),this.user=this.$jwtHelper.decodeToken(e),this.token=e,this.setLogoutTimer(),!0}catch{return window.localStorage.removeItem(c.jwt.tokenKey),this.token=null,!1}}setLogoutTimer(){if(clearTimeout(this.logoutTimer),!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)){let t=(0,k.default)(this.$jwtHelper.getTokenExpirationDate(this.token)).diff((0,k.default)().add(this.$settings.serverTimeOffset,"s"),"millisecond");t<=2147483647&&(this.logoutTimer=setTimeout(()=>a(this,null,function*(){this.$settings.formAuth===!1?(yield this.noauth(),window.location.reload()):this.logout()}),t))}}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac})}return r})();export{F as a,q as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as s}from"./chunk-
|
|
1
|
+
import{b as s}from"./chunk-BYDZXXU7.js";import{d as i}from"./chunk-DFFTJVRY.js";import{k as o}from"./chunk-JCCQ75XM.js";import{a}from"./chunk-KZKL7DGI.js";import{ga as e,la as r}from"./chunk-IOKYXV5M.js";var v=(()=>{class t{$auth=r(s);$router=r(i);$translate=r(a);$toastr=r(o);canActivate(){return this.$auth.user&&this.$auth.user.admin?!0:(this.$toastr.error(this.$translate.instant("toast.no_auth"),this.$translate.instant("toast.title_error")),this.$router.navigate(["/"]),!1)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=e({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{v as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Sb as t,Tb as i,Ub as o,mb as a,ta as r}from"./chunk-
|
|
1
|
+
import{Sb as t,Tb as i,Ub as o,mb as a,ta as r}from"./chunk-IOKYXV5M.js";var l=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=a({type:e,selectors:[["app-spinner"]],decls:7,vars:0,consts:[[1,"app-spinner-container"],[1,"animate_loader"],["xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink","width","200px","height","200px","viewBox","0 0 100 100","preserveAspectRatio","xMidYMid",2,"margin","auto","display","block"],["cx","50","cy","50","r","32","stroke-width","8","stroke-dasharray","50.26548245743669 50.26548245743669","fill","none","stroke-linecap","round","transform","rotate(327.259 50 50)",1,"spinner_outer"],["attributeName","transform","type","rotate","dur","2s","repeatCount","indefinite","keyTimes","0;1","values","0 50 50;360 50 50"],["cx","50","cy","50","r","23","stroke-width","8","stroke","#f8b26a","stroke-dasharray","36.12831551628262 36.12831551628262","stroke-dashoffset","36.12831551628262","fill","none","stroke-linecap","round","transform","rotate(-327.259 50 50)",1,"spinner_inner"],["attributeName","transform","type","rotate","dur","2s","repeatCount","indefinite","keyTimes","0;1","values","0 50 50;-360 50 50"]],template:function(n,m){n&1&&(t(0,"div",0)(1,"div",1),r(),t(2,"svg",2)(3,"circle",3),o(4,"animateTransform",4),i(),t(5,"circle",5),o(6,"animateTransform",6),i()()()())},styles:[".app-spinner-container[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:1000}.animate_loader[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;inset:0;margin:auto;width:200px;overflow:visible}"]})}return e})();export{l as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ag}from"./chunk-YO7SFY4E.js";import{a as tl,c as Ig,d as Pg,e as Ds,f as ri,g as CS}from"./chunk-F37WZQGE.js";import{a as kg}from"./chunk-M4QDQWSG.js";import{a as Tg}from"./chunk-3QBYXJ7T.js";import{a as jg}from"./chunk-PGM4QIVA.js";import{a as Sg,b as Cg,c as xg}from"./chunk-HHGB2T2Q.js";import{a as ko}from"./chunk-V35TPDVW.js";import{a as zg}from"./chunk-RCYYU6LQ.js";import{a as gn,b as hn}from"./chunk-DYB33NRF.js";import{a as pn,b as mn}from"./chunk-G6KV6PYE.js";import{a as Hg}from"./chunk-EZQF5CUM.js";import{a as nn,b as an,c as ln,d as dn,e as cn,f as un,g as Ns,m as Re,n as et,o as bg,p as fg,q as yg,r as vg,s as wg,t as Ei}from"./chunk-FYI7RHOJ.js";import{A as wo,a as dg,b as Ni,c as js,e as yt,f as cg,h as ug,i as gg,j as pg,k as mg,l as Di,m as hg,o as Bi,r as As,s as ns,t as as,y as _g,z as Yt}from"./chunk-KYB236MX.js";import{a as Ri}from"./chunk-YLBALIW6.js";import{d as oi}from"./chunk-6HJHVJPI.js";import{b as Oe}from"./chunk-WYHYUPM6.js";import{k as He,m as Ui,n as ve}from"./chunk-EF3XRHYY.js";import{a as ke,b as Fe}from"./chunk-FYDO54CR.js";import{e as lg}from"./chunk-KLQ6BEKS.js";import{$a as Qu,Ac as og,Ad as ag,Bc as rg,Ca as Ii,Cc as Pe,D as Gu,Da as Zu,Dc as Gt,Ec as os,Fa as Is,Fc as Et,Gc as zs,Hb as Y,Ib as T,Ic as H,Jb as I,Jc as C,Kc as Ke,Lb as ut,M as xs,Mb as gt,Nb as pt,Ob as y,Pb as m,Qb as p,Rb as x,Rc as mt,Sb as Xr,Sc as V,Tb as en,Tc as Ai,Ub as tn,Vb as tg,Vc as ng,Wb as ig,Xa as he,Z as Za,_b as $,a as J,aa as vo,ab as u,b as xe,bc as R,c as qu,cc as sn,dc as b,e as _,fa as Yu,fb as Zr,g as je,ga as Pt,gb as pi,h as G,ha as Ts,hc as Qa,ib as ts,ic as Xa,ja as Wu,jc as el,jd as Ut,k as Ku,ka as Ju,kc as Pi,kd as rs,la as z,lc as zi,ld as ht,mb as Q,mc as sg,n as It,nb as Ps,nc as Lt,o as Ja,ob as is,oc as ji,pb as Xu,pc as Z,q as Vu,qc as w,ra as E,rc as K,sa as U,sb as de,sc as O,sd as rn,tc as ss,ub as eg,uc as on,v as $u,vb as Qr,w as le,x as Lu,xc as Ae,yc as Ne,za as Jr,zc as De}from"./chunk-645YHJEQ.js";var Co=_(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.regexpCode=ye.getEsmExportName=ye.getProperty=ye.safeStringify=ye.stringify=ye.strConcat=ye.addCodeArg=ye.str=ye._=ye.nil=ye._Code=ye.Name=ye.IDENTIFIER=ye._CodeOrName=void 0;var Ho=class{};ye._CodeOrName=Ho;ye.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var ls=class extends Ho{constructor(i){if(super(),!ye.IDENTIFIER.test(i))throw new Error("CodeGen: name must be a valid identifier");this.str=i}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ye.Name=ls;var Rt=class extends Ho{constructor(i){super(),this._items=typeof i=="string"?[i]:i}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let i=this._items[0];return i===""||i==='""'}get str(){var i;return(i=this._str)!==null&&i!==void 0?i:this._str=this._items.reduce((t,s)=>`${t}${s}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,s)=>(s instanceof ls&&(t[s.str]=(t[s.str]||0)+1),t),{})}};ye._Code=Rt;ye.nil=new Rt("");function Ng(e,...i){let t=[e[0]],s=0;for(;s<i.length;)sl(t,i[s]),t.push(e[++s]);return new Rt(t)}ye._=Ng;var il=new Rt("+");function Dg(e,...i){let t=[So(e[0])],s=0;for(;s<i.length;)t.push(il),sl(t,i[s]),t.push(il,So(e[++s]));return xS(t),new Rt(t)}ye.str=Dg;function sl(e,i){i instanceof Rt?e.push(...i._items):i instanceof ls?e.push(i):e.push(PS(i))}ye.addCodeArg=sl;function xS(e){let i=1;for(;i<e.length-1;){if(e[i]===il){let t=TS(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function TS(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof ls||e[e.length-1]!=='"'?void 0:typeof i!="string"?`${e.slice(0,-1)}${i}"`:i[0]==='"'?e.slice(0,-1)+i.slice(1):void 0;if(typeof i=="string"&&i[0]==='"'&&!(e instanceof ls))return`"${e}${i.slice(1)}`}function IS(e,i){return i.emptyStr()?e:e.emptyStr()?i:Dg`${e}${i}`}ye.strConcat=IS;function PS(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:So(Array.isArray(e)?e.join(","):e)}function zS(e){return new Rt(So(e))}ye.stringify=zS;function So(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ye.safeStringify=So;function jS(e){return typeof e=="string"&&ye.IDENTIFIER.test(e)?new Rt(`.${e}`):Ng`[${e}]`}ye.getProperty=jS;function AS(e){if(typeof e=="string"&&ye.IDENTIFIER.test(e))return new Rt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ye.getEsmExportName=AS;function NS(e){return new Rt(e.toString())}ye.regexpCode=NS});var nl=_(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.ValueScope=wt.ValueScopeName=wt.Scope=wt.varKinds=wt.UsedValueState=void 0;var vt=Co(),ol=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},_n=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(_n||(wt.UsedValueState=_n={}));wt.varKinds={const:new vt.Name("const"),let:new vt.Name("let"),var:new vt.Name("var")};var bn=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof vt.Name?i:this.name(i)}name(i){return new vt.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,s;if(!((s=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||s===void 0)&&s.has(i)||this._prefixes&&!this._prefixes.has(i))throw new Error(`CodeGen: prefix "${i}" is not allowed in this scope`);return this._names[i]={prefix:i,index:0}}};wt.Scope=bn;var fn=class extends vt.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:s}){this.value=i,this.scopePath=(0,vt._)`.${new vt.Name(t)}[${s}]`}};wt.ValueScopeName=fn;var DS=(0,vt._)`\n`,rl=class extends bn{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=xe(J({},i),{_n:i.lines?DS:vt.nil})}get(){return this._scope}name(i){return new fn(i,this._newName(i))}value(i,t){var s;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(i),{prefix:r}=o,n=(s=t.key)!==null&&s!==void 0?s:t.ref,a=this._values[r];if(a){let c=a.get(n);if(c)return c}else a=this._values[r]=new Map;a.set(n,o);let l=this._scope[r]||(this._scope[r]=[]),d=l.length;return l[d]=t.ref,o.setValue(t,{property:r,itemIndex:d}),o}getValue(i,t){let s=this._values[i];if(s)return s.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,vt._)`${i}${s.scopePath}`})}scopeCode(i=this._values,t,s){return this._reduceValues(i,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},t,s)}_reduceValues(i,t,s={},o){let r=vt.nil;for(let n in i){let a=i[n];if(!a)continue;let l=s[n]=s[n]||new Map;a.forEach(d=>{if(l.has(d))return;l.set(d,_n.Started);let c=t(d);if(c){let g=this.opts.es5?wt.varKinds.var:wt.varKinds.const;r=(0,vt._)`${r}${g} ${d} = ${c};${this.opts._n}`}else if(c=o?.(d))r=(0,vt._)`${r}${c}${this.opts._n}`;else throw new ol(d);l.set(d,_n.Completed)})}return r}};wt.ValueScope=rl});var ee=_(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.or=ce.and=ce.not=ce.CodeGen=ce.operators=ce.varKinds=ce.ValueScopeName=ce.ValueScope=ce.Scope=ce.Name=ce.regexpCode=ce.stringify=ce.getProperty=ce.nil=ce.strConcat=ce.str=ce._=void 0;var _e=Co(),Wt=nl(),Fi=Co();Object.defineProperty(ce,"_",{enumerable:!0,get:function(){return Fi._}});Object.defineProperty(ce,"str",{enumerable:!0,get:function(){return Fi.str}});Object.defineProperty(ce,"strConcat",{enumerable:!0,get:function(){return Fi.strConcat}});Object.defineProperty(ce,"nil",{enumerable:!0,get:function(){return Fi.nil}});Object.defineProperty(ce,"getProperty",{enumerable:!0,get:function(){return Fi.getProperty}});Object.defineProperty(ce,"stringify",{enumerable:!0,get:function(){return Fi.stringify}});Object.defineProperty(ce,"regexpCode",{enumerable:!0,get:function(){return Fi.regexpCode}});Object.defineProperty(ce,"Name",{enumerable:!0,get:function(){return Fi.Name}});var Hn=nl();Object.defineProperty(ce,"Scope",{enumerable:!0,get:function(){return Hn.Scope}});Object.defineProperty(ce,"ValueScope",{enumerable:!0,get:function(){return Hn.ValueScope}});Object.defineProperty(ce,"ValueScopeName",{enumerable:!0,get:function(){return Hn.ValueScopeName}});Object.defineProperty(ce,"varKinds",{enumerable:!0,get:function(){return Hn.varKinds}});ce.operators={GT:new _e._Code(">"),GTE:new _e._Code(">="),LT:new _e._Code("<"),LTE:new _e._Code("<="),EQ:new _e._Code("==="),NEQ:new _e._Code("!=="),NOT:new _e._Code("!"),OR:new _e._Code("||"),AND:new _e._Code("&&"),ADD:new _e._Code("+")};var mi=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},al=class extends mi{constructor(i,t,s){super(),this.varKind=i,this.name=t,this.rhs=s}render({es5:i,_n:t}){let s=i?Wt.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${o};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=Bs(this.rhs,i,t)),this}get names(){return this.rhs instanceof _e._CodeOrName?this.rhs.names:{}}},vn=class extends mi{constructor(i,t,s){super(),this.lhs=i,this.rhs=t,this.sideEffects=s}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof _e.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=Bs(this.rhs,i,t),this}get names(){let i=this.lhs instanceof _e.Name?{}:J({},this.lhs.names);return kn(i,this.rhs)}},ll=class extends vn{constructor(i,t,s,o){super(i,s,o),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},dl=class extends mi{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},cl=class extends mi{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},ul=class extends mi{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},gl=class extends mi{constructor(i){super(),this.code=i}render({_n:i}){return`${this.code};`+i}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(i,t){return this.code=Bs(this.code,i,t),this}get names(){return this.code instanceof _e._CodeOrName?this.code.names:{}}},xo=class extends mi{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,s)=>t+s.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let s=i[t].optimizeNodes();Array.isArray(s)?i.splice(t,1,...s):s?i[t]=s:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:s}=this,o=s.length;for(;o--;){let r=s[o];r.optimizeNames(i,t)||(BS(i,r.names),s.splice(o,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>ds(i,t.names),{})}},hi=class extends xo{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},pl=class extends xo{},ml=(()=>{class e extends hi{}return e.kind="else",e})(),yn=(()=>{class e extends hi{constructor(t,s){super(s),this.condition=t}render(t){let s=`if(${this.condition})`+super.render(t);return this.else&&(s+="else "+this.else.render(t)),s}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let s=this.else;if(s){let o=s.optimizeNodes();s=this.else=Array.isArray(o)?new ml(o):o}if(s)return t===!1?s instanceof e?s:s.nodes:this.nodes.length?this:new e(Fg(t),s instanceof e?[s]:s.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,s){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,s),!!(super.optimizeNames(t,s)||this.else))return this.condition=Bs(this.condition,t,s),this}get names(){let t=super.names;return kn(t,this.condition),this.else&&ds(t,this.else.names),t}}return e.kind="if",e})(),Sn=(()=>{class e extends hi{}return e.kind="for",e})(),hl=class extends Sn{constructor(i){super(),this.iteration=i}render(i){return`for(${this.iteration})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iteration=Bs(this.iteration,i,t),this}get names(){return ds(super.names,this.iteration.names)}},_l=class extends Sn{constructor(i,t,s,o){super(),this.varKind=i,this.name=t,this.from=s,this.to=o}render(i){let t=i.es5?Wt.varKinds.var:this.varKind,{name:s,from:o,to:r}=this;return`for(${t} ${s}=${o}; ${s}<${r}; ${s}++)`+super.render(i)}get names(){let i=kn(super.names,this.from);return kn(i,this.to)}},wn=class extends Sn{constructor(i,t,s,o){super(),this.loop=i,this.varKind=t,this.name=s,this.iterable=o}render(i){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iterable=Bs(this.iterable,i,t),this}get names(){return ds(super.names,this.iterable.names)}},Bg=(()=>{class e extends hi{constructor(t,s,o){super(),this.name=t,this.args=s,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),Eg=(()=>{class e extends xo{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),bl=class extends hi{render(i){let t="try"+super.render(i);return this.catch&&(t+=this.catch.render(i)),this.finally&&(t+=this.finally.render(i)),t}optimizeNodes(){var i,t;return super.optimizeNodes(),(i=this.catch)===null||i===void 0||i.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(i,t){var s,o;return super.optimizeNames(i,t),(s=this.catch)===null||s===void 0||s.optimizeNames(i,t),(o=this.finally)===null||o===void 0||o.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&ds(i,this.catch.names),this.finally&&ds(i,this.finally.names),i}},Ug=(()=>{class e extends hi{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),Rg=(()=>{class e extends hi{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),fl=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=xe(J({},t),{_n:t.lines?`
|
|
1
|
+
import{a as Ag}from"./chunk-2LMFJYC4.js";import{a as tl,c as Ig,d as Pg,e as Ds,f as ri,g as CS}from"./chunk-ULDXS7ZK.js";import{a as kg}from"./chunk-2C3X2ESN.js";import{a as Tg}from"./chunk-D7VCPH6W.js";import{a as jg}from"./chunk-S6BEKQWI.js";import{a as Sg,b as Cg,c as xg}from"./chunk-FVKMBZOU.js";import{a as ko}from"./chunk-H5WTK5UT.js";import{a as zg}from"./chunk-WCOLHYTR.js";import{a as gn,b as hn}from"./chunk-H45DK7IX.js";import{a as pn,b as mn}from"./chunk-J6CJ26QN.js";import{a as Hg}from"./chunk-ZUTM7S4U.js";import{a as nn,b as an,c as ln,d as dn,e as cn,f as un,g as Ns,m as Re,n as et,o as bg,p as fg,q as yg,r as vg,s as wg,t as Ei}from"./chunk-IWFKJHPR.js";import{A as wo,a as dg,b as Ni,c as js,e as yt,f as cg,h as ug,i as gg,j as pg,k as mg,l as Di,m as hg,o as Bi,r as As,s as ns,t as as,y as _g,z as Yt}from"./chunk-7EQFLCW4.js";import{a as Ri}from"./chunk-QSP4KI3N.js";import{d as oi}from"./chunk-DFFTJVRY.js";import{b as Oe}from"./chunk-ZY5SUCRL.js";import{k as He,m as Ui,n as ve}from"./chunk-JCCQ75XM.js";import{a as ke,b as Fe}from"./chunk-KZKL7DGI.js";import{e as lg}from"./chunk-OA7Y3E5A.js";import{$a as Qu,Ac as og,Bc as rg,Bd as ag,Ca as Ii,Cc as Pe,D as Gu,Da as Zu,Dc as Gt,Ec as os,Fa as Is,Fc as Et,Gc as zs,Hb as Y,Ib as T,Jb as I,Jc as H,Kc as C,Lb as ut,Lc as Ke,M as xs,Mb as gt,Nb as pt,Ob as y,Pb as m,Qb as p,Rb as x,Sb as Xr,Sc as mt,Tb as en,Tc as V,Ub as tn,Uc as Ai,Vb as tg,Wb as ig,Wc as ng,Xa as he,Z as Za,_b as $,a as J,aa as vo,ab as u,b as xe,bc as R,c as qu,cc as sn,dc as b,e as _,fa as Yu,fb as Zr,g as je,ga as Pt,gb as pi,h as G,ha as Ts,hc as Qa,ib as ts,ic as Xa,ja as Wu,jc as el,k as Ku,ka as Ju,kc as Pi,kd as Ut,la as z,lc as zi,ld as rs,mb as Q,mc as sg,md as ht,n as It,nb as Ps,nc as Lt,o as Ja,ob as is,oc as ji,pb as Xu,pc as Z,q as Vu,qc as w,ra as E,rc as K,sa as U,sb as de,sc as O,tc as ss,td as rn,ub as eg,uc as on,v as $u,vb as Qr,w as le,x as Lu,xc as Ae,yc as Ne,za as Jr,zc as De}from"./chunk-IOKYXV5M.js";var Co=_(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.regexpCode=ye.getEsmExportName=ye.getProperty=ye.safeStringify=ye.stringify=ye.strConcat=ye.addCodeArg=ye.str=ye._=ye.nil=ye._Code=ye.Name=ye.IDENTIFIER=ye._CodeOrName=void 0;var Ho=class{};ye._CodeOrName=Ho;ye.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var ls=class extends Ho{constructor(i){if(super(),!ye.IDENTIFIER.test(i))throw new Error("CodeGen: name must be a valid identifier");this.str=i}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ye.Name=ls;var Rt=class extends Ho{constructor(i){super(),this._items=typeof i=="string"?[i]:i}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let i=this._items[0];return i===""||i==='""'}get str(){var i;return(i=this._str)!==null&&i!==void 0?i:this._str=this._items.reduce((t,s)=>`${t}${s}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,s)=>(s instanceof ls&&(t[s.str]=(t[s.str]||0)+1),t),{})}};ye._Code=Rt;ye.nil=new Rt("");function Ng(e,...i){let t=[e[0]],s=0;for(;s<i.length;)sl(t,i[s]),t.push(e[++s]);return new Rt(t)}ye._=Ng;var il=new Rt("+");function Dg(e,...i){let t=[So(e[0])],s=0;for(;s<i.length;)t.push(il),sl(t,i[s]),t.push(il,So(e[++s]));return xS(t),new Rt(t)}ye.str=Dg;function sl(e,i){i instanceof Rt?e.push(...i._items):i instanceof ls?e.push(i):e.push(PS(i))}ye.addCodeArg=sl;function xS(e){let i=1;for(;i<e.length-1;){if(e[i]===il){let t=TS(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function TS(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof ls||e[e.length-1]!=='"'?void 0:typeof i!="string"?`${e.slice(0,-1)}${i}"`:i[0]==='"'?e.slice(0,-1)+i.slice(1):void 0;if(typeof i=="string"&&i[0]==='"'&&!(e instanceof ls))return`"${e}${i.slice(1)}`}function IS(e,i){return i.emptyStr()?e:e.emptyStr()?i:Dg`${e}${i}`}ye.strConcat=IS;function PS(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:So(Array.isArray(e)?e.join(","):e)}function zS(e){return new Rt(So(e))}ye.stringify=zS;function So(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ye.safeStringify=So;function jS(e){return typeof e=="string"&&ye.IDENTIFIER.test(e)?new Rt(`.${e}`):Ng`[${e}]`}ye.getProperty=jS;function AS(e){if(typeof e=="string"&&ye.IDENTIFIER.test(e))return new Rt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ye.getEsmExportName=AS;function NS(e){return new Rt(e.toString())}ye.regexpCode=NS});var nl=_(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.ValueScope=wt.ValueScopeName=wt.Scope=wt.varKinds=wt.UsedValueState=void 0;var vt=Co(),ol=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},_n=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(_n||(wt.UsedValueState=_n={}));wt.varKinds={const:new vt.Name("const"),let:new vt.Name("let"),var:new vt.Name("var")};var bn=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof vt.Name?i:this.name(i)}name(i){return new vt.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,s;if(!((s=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||s===void 0)&&s.has(i)||this._prefixes&&!this._prefixes.has(i))throw new Error(`CodeGen: prefix "${i}" is not allowed in this scope`);return this._names[i]={prefix:i,index:0}}};wt.Scope=bn;var fn=class extends vt.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:s}){this.value=i,this.scopePath=(0,vt._)`.${new vt.Name(t)}[${s}]`}};wt.ValueScopeName=fn;var DS=(0,vt._)`\n`,rl=class extends bn{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=xe(J({},i),{_n:i.lines?DS:vt.nil})}get(){return this._scope}name(i){return new fn(i,this._newName(i))}value(i,t){var s;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(i),{prefix:r}=o,n=(s=t.key)!==null&&s!==void 0?s:t.ref,a=this._values[r];if(a){let c=a.get(n);if(c)return c}else a=this._values[r]=new Map;a.set(n,o);let l=this._scope[r]||(this._scope[r]=[]),d=l.length;return l[d]=t.ref,o.setValue(t,{property:r,itemIndex:d}),o}getValue(i,t){let s=this._values[i];if(s)return s.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,vt._)`${i}${s.scopePath}`})}scopeCode(i=this._values,t,s){return this._reduceValues(i,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},t,s)}_reduceValues(i,t,s={},o){let r=vt.nil;for(let n in i){let a=i[n];if(!a)continue;let l=s[n]=s[n]||new Map;a.forEach(d=>{if(l.has(d))return;l.set(d,_n.Started);let c=t(d);if(c){let g=this.opts.es5?wt.varKinds.var:wt.varKinds.const;r=(0,vt._)`${r}${g} ${d} = ${c};${this.opts._n}`}else if(c=o?.(d))r=(0,vt._)`${r}${c}${this.opts._n}`;else throw new ol(d);l.set(d,_n.Completed)})}return r}};wt.ValueScope=rl});var ee=_(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.or=ce.and=ce.not=ce.CodeGen=ce.operators=ce.varKinds=ce.ValueScopeName=ce.ValueScope=ce.Scope=ce.Name=ce.regexpCode=ce.stringify=ce.getProperty=ce.nil=ce.strConcat=ce.str=ce._=void 0;var _e=Co(),Wt=nl(),Fi=Co();Object.defineProperty(ce,"_",{enumerable:!0,get:function(){return Fi._}});Object.defineProperty(ce,"str",{enumerable:!0,get:function(){return Fi.str}});Object.defineProperty(ce,"strConcat",{enumerable:!0,get:function(){return Fi.strConcat}});Object.defineProperty(ce,"nil",{enumerable:!0,get:function(){return Fi.nil}});Object.defineProperty(ce,"getProperty",{enumerable:!0,get:function(){return Fi.getProperty}});Object.defineProperty(ce,"stringify",{enumerable:!0,get:function(){return Fi.stringify}});Object.defineProperty(ce,"regexpCode",{enumerable:!0,get:function(){return Fi.regexpCode}});Object.defineProperty(ce,"Name",{enumerable:!0,get:function(){return Fi.Name}});var Hn=nl();Object.defineProperty(ce,"Scope",{enumerable:!0,get:function(){return Hn.Scope}});Object.defineProperty(ce,"ValueScope",{enumerable:!0,get:function(){return Hn.ValueScope}});Object.defineProperty(ce,"ValueScopeName",{enumerable:!0,get:function(){return Hn.ValueScopeName}});Object.defineProperty(ce,"varKinds",{enumerable:!0,get:function(){return Hn.varKinds}});ce.operators={GT:new _e._Code(">"),GTE:new _e._Code(">="),LT:new _e._Code("<"),LTE:new _e._Code("<="),EQ:new _e._Code("==="),NEQ:new _e._Code("!=="),NOT:new _e._Code("!"),OR:new _e._Code("||"),AND:new _e._Code("&&"),ADD:new _e._Code("+")};var mi=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},al=class extends mi{constructor(i,t,s){super(),this.varKind=i,this.name=t,this.rhs=s}render({es5:i,_n:t}){let s=i?Wt.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${o};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=Bs(this.rhs,i,t)),this}get names(){return this.rhs instanceof _e._CodeOrName?this.rhs.names:{}}},vn=class extends mi{constructor(i,t,s){super(),this.lhs=i,this.rhs=t,this.sideEffects=s}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof _e.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=Bs(this.rhs,i,t),this}get names(){let i=this.lhs instanceof _e.Name?{}:J({},this.lhs.names);return kn(i,this.rhs)}},ll=class extends vn{constructor(i,t,s,o){super(i,s,o),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},dl=class extends mi{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},cl=class extends mi{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},ul=class extends mi{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},gl=class extends mi{constructor(i){super(),this.code=i}render({_n:i}){return`${this.code};`+i}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(i,t){return this.code=Bs(this.code,i,t),this}get names(){return this.code instanceof _e._CodeOrName?this.code.names:{}}},xo=class extends mi{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,s)=>t+s.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let s=i[t].optimizeNodes();Array.isArray(s)?i.splice(t,1,...s):s?i[t]=s:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:s}=this,o=s.length;for(;o--;){let r=s[o];r.optimizeNames(i,t)||(BS(i,r.names),s.splice(o,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>ds(i,t.names),{})}},hi=class extends xo{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},pl=class extends xo{},ml=(()=>{class e extends hi{}return e.kind="else",e})(),yn=(()=>{class e extends hi{constructor(t,s){super(s),this.condition=t}render(t){let s=`if(${this.condition})`+super.render(t);return this.else&&(s+="else "+this.else.render(t)),s}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let s=this.else;if(s){let o=s.optimizeNodes();s=this.else=Array.isArray(o)?new ml(o):o}if(s)return t===!1?s instanceof e?s:s.nodes:this.nodes.length?this:new e(Fg(t),s instanceof e?[s]:s.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,s){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,s),!!(super.optimizeNames(t,s)||this.else))return this.condition=Bs(this.condition,t,s),this}get names(){let t=super.names;return kn(t,this.condition),this.else&&ds(t,this.else.names),t}}return e.kind="if",e})(),Sn=(()=>{class e extends hi{}return e.kind="for",e})(),hl=class extends Sn{constructor(i){super(),this.iteration=i}render(i){return`for(${this.iteration})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iteration=Bs(this.iteration,i,t),this}get names(){return ds(super.names,this.iteration.names)}},_l=class extends Sn{constructor(i,t,s,o){super(),this.varKind=i,this.name=t,this.from=s,this.to=o}render(i){let t=i.es5?Wt.varKinds.var:this.varKind,{name:s,from:o,to:r}=this;return`for(${t} ${s}=${o}; ${s}<${r}; ${s}++)`+super.render(i)}get names(){let i=kn(super.names,this.from);return kn(i,this.to)}},wn=class extends Sn{constructor(i,t,s,o){super(),this.loop=i,this.varKind=t,this.name=s,this.iterable=o}render(i){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iterable=Bs(this.iterable,i,t),this}get names(){return ds(super.names,this.iterable.names)}},Bg=(()=>{class e extends hi{constructor(t,s,o){super(),this.name=t,this.args=s,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),Eg=(()=>{class e extends xo{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),bl=class extends hi{render(i){let t="try"+super.render(i);return this.catch&&(t+=this.catch.render(i)),this.finally&&(t+=this.finally.render(i)),t}optimizeNodes(){var i,t;return super.optimizeNodes(),(i=this.catch)===null||i===void 0||i.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(i,t){var s,o;return super.optimizeNames(i,t),(s=this.catch)===null||s===void 0||s.optimizeNames(i,t),(o=this.finally)===null||o===void 0||o.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&ds(i,this.catch.names),this.finally&&ds(i,this.finally.names),i}},Ug=(()=>{class e extends hi{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),Rg=(()=>{class e extends hi{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),fl=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=xe(J({},t),{_n:t.lines?`
|
|
2
2
|
`:""}),this._extScope=i,this._scope=new Wt.Scope({parent:i}),this._nodes=[new pl]}toString(){return this._root.render(this.opts)}name(i){return this._scope.name(i)}scopeName(i){return this._extScope.name(i)}scopeValue(i,t){let s=this._extScope.value(i,t);return(this._values[s.prefix]||(this._values[s.prefix]=new Set)).add(s),s}getScopeValue(i,t){return this._extScope.getValue(i,t)}scopeRefs(i){return this._extScope.scopeRefs(i,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(i,t,s,o){let r=this._scope.toName(t);return s!==void 0&&o&&(this._constants[r.str]=s),this._leafNode(new al(i,r,s)),r}const(i,t,s){return this._def(Wt.varKinds.const,i,t,s)}let(i,t,s){return this._def(Wt.varKinds.let,i,t,s)}var(i,t,s){return this._def(Wt.varKinds.var,i,t,s)}assign(i,t,s){return this._leafNode(new vn(i,t,s))}add(i,t){return this._leafNode(new ll(i,ce.operators.ADD,t))}code(i){return typeof i=="function"?i():i!==_e.nil&&this._leafNode(new gl(i)),this}object(...i){let t=["{"];for(let[s,o]of i)t.length>1&&t.push(","),t.push(s),(s!==o||this.opts.es5)&&(t.push(":"),(0,_e.addCodeArg)(t,o));return t.push("}"),new _e._Code(t)}if(i,t,s){if(this._blockNode(new yn(i)),t&&s)this.code(t).else().code(s).endIf();else if(t)this.code(t).endIf();else if(s)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(i){return this._elseNode(new yn(i))}else(){return this._elseNode(new ml)}endIf(){return this._endBlockNode(yn,ml)}_for(i,t){return this._blockNode(i),t&&this.code(t).endFor(),this}for(i,t){return this._for(new hl(i),t)}forRange(i,t,s,o,r=this.opts.es5?Wt.varKinds.var:Wt.varKinds.let){let n=this._scope.toName(i);return this._for(new _l(r,n,t,s),()=>o(n))}forOf(i,t,s,o=Wt.varKinds.const){let r=this._scope.toName(i);if(this.opts.es5){let n=t instanceof _e.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,_e._)`${n}.length`,a=>{this.var(r,(0,_e._)`${n}[${a}]`),s(r)})}return this._for(new wn("of",o,r,t),()=>s(r))}forIn(i,t,s,o=this.opts.es5?Wt.varKinds.var:Wt.varKinds.const){if(this.opts.ownProperties)return this.forOf(i,(0,_e._)`Object.keys(${t})`,s);let r=this._scope.toName(i);return this._for(new wn("in",o,r,t),()=>s(r))}endFor(){return this._endBlockNode(Sn)}label(i){return this._leafNode(new dl(i))}break(i){return this._leafNode(new cl(i))}return(i){let t=new Eg;if(this._blockNode(t),this.code(i),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Eg)}try(i,t,s){if(!t&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new bl;if(this._blockNode(o),this.code(i),t){let r=this.name("e");this._currNode=o.catch=new Ug(r),t(r)}return s&&(this._currNode=o.finally=new Rg,this.code(s)),this._endBlockNode(Ug,Rg)}throw(i){return this._leafNode(new ul(i))}block(i,t){return this._blockStarts.push(this._nodes.length),i&&this.code(i).endBlock(t),this}endBlock(i){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let s=this._nodes.length-t;if(s<0||i!==void 0&&s!==i)throw new Error(`CodeGen: wrong number of nodes: ${s} vs ${i} expected`);return this._nodes.length=t,this}func(i,t=_e.nil,s,o){return this._blockNode(new Bg(i,t,s)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(Bg)}optimize(i=1){for(;i-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(i){return this._currNode.nodes.push(i),this}_blockNode(i){this._currNode.nodes.push(i),this._nodes.push(i)}_endBlockNode(i,t){let s=this._currNode;if(s instanceof i||t&&s instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${i.kind}/${t.kind}`:i.kind}"`)}_elseNode(i){let t=this._currNode;if(!(t instanceof yn))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=i,this}get _root(){return this._nodes[0]}get _currNode(){let i=this._nodes;return i[i.length-1]}set _currNode(i){let t=this._nodes;t[t.length-1]=i}};ce.CodeGen=fl;function ds(e,i){for(let t in i)e[t]=(e[t]||0)+(i[t]||0);return e}function kn(e,i){return i instanceof _e._CodeOrName?ds(e,i.names):e}function Bs(e,i,t){if(e instanceof _e.Name)return s(e);if(!o(e))return e;return new _e._Code(e._items.reduce((r,n)=>(n instanceof _e.Name&&(n=s(n)),n instanceof _e._Code?r.push(...n._items):r.push(n),r),[]));function s(r){let n=t[r.str];return n===void 0||i[r.str]!==1?r:(delete i[r.str],n)}function o(r){return r instanceof _e._Code&&r._items.some(n=>n instanceof _e.Name&&i[n.str]===1&&t[n.str]!==void 0)}}function BS(e,i){for(let t in i)e[t]=(e[t]||0)-(i[t]||0)}function Fg(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,_e._)`!${yl(e)}`}ce.not=Fg;var ES=Og(ce.operators.AND);function US(...e){return e.reduce(ES)}ce.and=US;var RS=Og(ce.operators.OR);function FS(...e){return e.reduce(RS)}ce.or=FS;function Og(e){return(i,t)=>i===_e.nil?t:t===_e.nil?i:(0,_e._)`${yl(i)} ${e} ${yl(t)}`}function yl(e){return e instanceof _e.Name?e:(0,_e._)`(${e})`}});var ge=_(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.checkStrictMode=ue.getErrorPath=ue.Type=ue.useFunc=ue.setEvaluated=ue.evaluatedPropsToName=ue.mergeEvaluated=ue.eachItem=ue.unescapeJsonPointer=ue.escapeJsonPointer=ue.escapeFragment=ue.unescapeFragment=ue.schemaRefOrVal=ue.schemaHasRulesButRef=ue.schemaHasRules=ue.checkUnknownRules=ue.alwaysValidSchema=ue.toHash=void 0;var Te=ee(),OS=Co();function MS(e){let i={};for(let t of e)i[t]=!0;return i}ue.toHash=MS;function qS(e,i){return typeof i=="boolean"?i:Object.keys(i).length===0?!0:(Kg(e,i),!Vg(i,e.self.RULES.all))}ue.alwaysValidSchema=qS;function Kg(e,i=e.schema){let{opts:t,self:s}=e;if(!t.strictSchema||typeof i=="boolean")return;let o=s.RULES.keywords;for(let r in i)o[r]||Gg(e,`unknown keyword: "${r}"`)}ue.checkUnknownRules=Kg;function Vg(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(i[t])return!0;return!1}ue.schemaHasRules=Vg;function KS(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&i.all[t])return!0;return!1}ue.schemaHasRulesButRef=KS;function VS({topSchemaRef:e,schemaPath:i},t,s,o){if(!o){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Te._)`${t}`}return(0,Te._)`${e}${i}${(0,Te.getProperty)(s)}`}ue.schemaRefOrVal=VS;function $S(e){return $g(decodeURIComponent(e))}ue.unescapeFragment=$S;function LS(e){return encodeURIComponent(wl(e))}ue.escapeFragment=LS;function wl(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ue.escapeJsonPointer=wl;function $g(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ue.unescapeJsonPointer=$g;function GS(e,i){if(Array.isArray(e))for(let t of e)i(t);else i(e)}ue.eachItem=GS;function Mg({mergeNames:e,mergeToName:i,mergeValues:t,resultToName:s}){return(o,r,n,a)=>{let l=n===void 0?r:n instanceof Te.Name?(r instanceof Te.Name?e(o,r,n):i(o,r,n),n):r instanceof Te.Name?(i(o,n,r),r):t(r,n);return a===Te.Name&&!(l instanceof Te.Name)?s(o,l):l}}ue.mergeEvaluated={props:Mg({mergeNames:(e,i,t)=>e.if((0,Te._)`${t} !== true && ${i} !== undefined`,()=>{e.if((0,Te._)`${i} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,Te._)`${t} || {}`).code((0,Te._)`Object.assign(${t}, ${i})`))}),mergeToName:(e,i,t)=>e.if((0,Te._)`${t} !== true`,()=>{i===!0?e.assign(t,!0):(e.assign(t,(0,Te._)`${t} || {}`),kl(e,t,i))}),mergeValues:(e,i)=>e===!0?!0:J(J({},e),i),resultToName:Lg}),items:Mg({mergeNames:(e,i,t)=>e.if((0,Te._)`${t} !== true && ${i} !== undefined`,()=>e.assign(t,(0,Te._)`${i} === true ? true : ${t} > ${i} ? ${t} : ${i}`)),mergeToName:(e,i,t)=>e.if((0,Te._)`${t} !== true`,()=>e.assign(t,i===!0?!0:(0,Te._)`${t} > ${i} ? ${t} : ${i}`)),mergeValues:(e,i)=>e===!0?!0:Math.max(e,i),resultToName:(e,i)=>e.var("items",i)})};function Lg(e,i){if(i===!0)return e.var("props",!0);let t=e.var("props",(0,Te._)`{}`);return i!==void 0&&kl(e,t,i),t}ue.evaluatedPropsToName=Lg;function kl(e,i,t){Object.keys(t).forEach(s=>e.assign((0,Te._)`${i}${(0,Te.getProperty)(s)}`,!0))}ue.setEvaluated=kl;var qg={};function YS(e,i){return e.scopeValue("func",{ref:i,code:qg[i.code]||(qg[i.code]=new OS._Code(i.code))})}ue.useFunc=YS;var vl=function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e}(vl||(ue.Type=vl={}));function WS(e,i,t){if(e instanceof Te.Name){let s=i===vl.Num;return t?s?(0,Te._)`"[" + ${e} + "]"`:(0,Te._)`"['" + ${e} + "']"`:s?(0,Te._)`"/" + ${e}`:(0,Te._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Te.getProperty)(e).toString():"/"+wl(e)}ue.getErrorPath=WS;function Gg(e,i,t=e.opts.strictSchema){if(t){if(i=`strict mode: ${i}`,t===!0)throw new Error(i);e.self.logger.warn(i)}}ue.checkStrictMode=Gg});var Ft=_(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});var rt=ee(),JS={data:new rt.Name("data"),valCxt:new rt.Name("valCxt"),instancePath:new rt.Name("instancePath"),parentData:new rt.Name("parentData"),parentDataProperty:new rt.Name("parentDataProperty"),rootData:new rt.Name("rootData"),dynamicAnchors:new rt.Name("dynamicAnchors"),vErrors:new rt.Name("vErrors"),errors:new rt.Name("errors"),this:new rt.Name("this"),self:new rt.Name("self"),scope:new rt.Name("scope"),json:new rt.Name("json"),jsonPos:new rt.Name("jsonPos"),jsonLen:new rt.Name("jsonLen"),jsonPart:new rt.Name("jsonPart")};Hl.default=JS});var To=_(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.extendErrors=nt.resetErrorsCount=nt.reportExtraError=nt.reportError=nt.keyword$DataError=nt.keywordError=void 0;var fe=ee(),Cn=ge(),_t=Ft();nt.keywordError={message:({keyword:e})=>(0,fe.str)`must pass "${e}" keyword validation`};nt.keyword$DataError={message:({keyword:e,schemaType:i})=>i?(0,fe.str)`"${e}" keyword must be ${i} ($data)`:(0,fe.str)`"${e}" keyword is invalid ($data)`};function ZS(e,i=nt.keywordError,t,s){let{it:o}=e,{gen:r,compositeRule:n,allErrors:a}=o,l=Jg(e,i,t);s??(n||a)?Yg(r,l):Wg(o,(0,fe._)`[${l}]`)}nt.reportError=ZS;function QS(e,i=nt.keywordError,t){let{it:s}=e,{gen:o,compositeRule:r,allErrors:n}=s,a=Jg(e,i,t);Yg(o,a),r||n||Wg(s,_t.default.vErrors)}nt.reportExtraError=QS;function XS(e,i){e.assign(_t.default.errors,i),e.if((0,fe._)`${_t.default.vErrors} !== null`,()=>e.if(i,()=>e.assign((0,fe._)`${_t.default.vErrors}.length`,i),()=>e.assign(_t.default.vErrors,null)))}nt.resetErrorsCount=XS;function eC({gen:e,keyword:i,schemaValue:t,data:s,errsCount:o,it:r}){if(o===void 0)throw new Error("ajv implementation error");let n=e.name("err");e.forRange("i",o,_t.default.errors,a=>{e.const(n,(0,fe._)`${_t.default.vErrors}[${a}]`),e.if((0,fe._)`${n}.instancePath === undefined`,()=>e.assign((0,fe._)`${n}.instancePath`,(0,fe.strConcat)(_t.default.instancePath,r.errorPath))),e.assign((0,fe._)`${n}.schemaPath`,(0,fe.str)`${r.errSchemaPath}/${i}`),r.opts.verbose&&(e.assign((0,fe._)`${n}.schema`,t),e.assign((0,fe._)`${n}.data`,s))})}nt.extendErrors=eC;function Yg(e,i){let t=e.const("err",i);e.if((0,fe._)`${_t.default.vErrors} === null`,()=>e.assign(_t.default.vErrors,(0,fe._)`[${t}]`),(0,fe._)`${_t.default.vErrors}.push(${t})`),e.code((0,fe._)`${_t.default.errors}++`)}function Wg(e,i){let{gen:t,validateName:s,schemaEnv:o}=e;o.$async?t.throw((0,fe._)`new ${e.ValidationError}(${i})`):(t.assign((0,fe._)`${s}.errors`,i),t.return(!1))}var cs={keyword:new fe.Name("keyword"),schemaPath:new fe.Name("schemaPath"),params:new fe.Name("params"),propertyName:new fe.Name("propertyName"),message:new fe.Name("message"),schema:new fe.Name("schema"),parentSchema:new fe.Name("parentSchema")};function Jg(e,i,t){let{createErrors:s}=e.it;return s===!1?(0,fe._)`{}`:tC(e,i,t)}function tC(e,i,t={}){let{gen:s,it:o}=e,r=[iC(o,t),sC(e,t)];return oC(e,i,r),s.object(...r)}function iC({errorPath:e},{instancePath:i}){let t=i?(0,fe.str)`${e}${(0,Cn.getErrorPath)(i,Cn.Type.Str)}`:e;return[_t.default.instancePath,(0,fe.strConcat)(_t.default.instancePath,t)]}function sC({keyword:e,it:{errSchemaPath:i}},{schemaPath:t,parentSchema:s}){let o=s?i:(0,fe.str)`${i}/${e}`;return t&&(o=(0,fe.str)`${o}${(0,Cn.getErrorPath)(t,Cn.Type.Str)}`),[cs.schemaPath,o]}function oC(e,{params:i,message:t},s){let{keyword:o,data:r,schemaValue:n,it:a}=e,{opts:l,propertyName:d,topSchemaRef:c,schemaPath:g}=a;s.push([cs.keyword,o],[cs.params,typeof i=="function"?i(e):i||(0,fe._)`{}`]),l.messages&&s.push([cs.message,typeof t=="function"?t(e):t]),l.verbose&&s.push([cs.schema,n],[cs.parentSchema,(0,fe._)`${c}${g}`],[_t.default.data,r]),d&&s.push([cs.propertyName,d])}});var Qg=_(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.boolOrEmptySchema=Es.topBoolOrEmptySchema=void 0;var rC=To(),nC=ee(),aC=Ft(),lC={message:"boolean schema is false"};function dC(e){let{gen:i,schema:t,validateName:s}=e;t===!1?Zg(e,!1):typeof t=="object"&&t.$async===!0?i.return(aC.default.data):(i.assign((0,nC._)`${s}.errors`,null),i.return(!0))}Es.topBoolOrEmptySchema=dC;function cC(e,i){let{gen:t,schema:s}=e;s===!1?(t.var(i,!1),Zg(e)):t.var(i,!0)}Es.boolOrEmptySchema=cC;function Zg(e,i){let{gen:t,data:s}=e,o={gen:t,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,rC.reportError)(o,lC,void 0,i)}});var Sl=_(Us=>{"use strict";Object.defineProperty(Us,"__esModule",{value:!0});Us.getRules=Us.isJSONType=void 0;var uC=["string","number","integer","boolean","null","object","array"],gC=new Set(uC);function pC(e){return typeof e=="string"&&gC.has(e)}Us.isJSONType=pC;function mC(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:xe(J({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Us.getRules=mC});var Cl=_(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.shouldUseRule=Oi.shouldUseGroup=Oi.schemaHasRulesForType=void 0;function hC({schema:e,self:i},t){let s=i.RULES.types[t];return s&&s!==!0&&Xg(e,s)}Oi.schemaHasRulesForType=hC;function Xg(e,i){return i.rules.some(t=>ep(e,t))}Oi.shouldUseGroup=Xg;function ep(e,i){var t;return e[i.keyword]!==void 0||((t=i.definition.implements)===null||t===void 0?void 0:t.some(s=>e[s]!==void 0))}Oi.shouldUseRule=ep});var Io=_(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.reportTypeError=at.checkDataTypes=at.checkDataType=at.coerceAndCheckDataType=at.getJSONTypes=at.getSchemaTypes=at.DataType=void 0;var _C=Sl(),bC=Cl(),fC=To(),ne=ee(),tp=ge(),Rs=function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e}(Rs||(at.DataType=Rs={}));function yC(e){let i=ip(e.type);if(i.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!i.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&i.push("null")}return i}at.getSchemaTypes=yC;function ip(e){let i=Array.isArray(e)?e:e?[e]:[];if(i.every(_C.isJSONType))return i;throw new Error("type must be JSONType or JSONType[]: "+i.join(","))}at.getJSONTypes=ip;function vC(e,i){let{gen:t,data:s,opts:o}=e,r=wC(i,o.coerceTypes),n=i.length>0&&!(r.length===0&&i.length===1&&(0,bC.schemaHasRulesForType)(e,i[0]));if(n){let a=Tl(i,s,o.strictNumbers,Rs.Wrong);t.if(a,()=>{r.length?kC(e,i,r):Il(e)})}return n}at.coerceAndCheckDataType=vC;var sp=new Set(["string","number","integer","boolean","null"]);function wC(e,i){return i?e.filter(t=>sp.has(t)||i==="array"&&t==="array"):[]}function kC(e,i,t){let{gen:s,data:o,opts:r}=e,n=s.let("dataType",(0,ne._)`typeof ${o}`),a=s.let("coerced",(0,ne._)`undefined`);r.coerceTypes==="array"&&s.if((0,ne._)`${n} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>s.assign(o,(0,ne._)`${o}[0]`).assign(n,(0,ne._)`typeof ${o}`).if(Tl(i,o,r.strictNumbers),()=>s.assign(a,o))),s.if((0,ne._)`${a} !== undefined`);for(let d of t)(sp.has(d)||d==="array"&&r.coerceTypes==="array")&&l(d);s.else(),Il(e),s.endIf(),s.if((0,ne._)`${a} !== undefined`,()=>{s.assign(o,a),HC(e,a)});function l(d){switch(d){case"string":s.elseIf((0,ne._)`${n} == "number" || ${n} == "boolean"`).assign(a,(0,ne._)`"" + ${o}`).elseIf((0,ne._)`${o} === null`).assign(a,(0,ne._)`""`);return;case"number":s.elseIf((0,ne._)`${n} == "boolean" || ${o} === null
|
|
3
3
|
|| (${n} == "string" && ${o} && ${o} == +${o})`).assign(a,(0,ne._)`+${o}`);return;case"integer":s.elseIf((0,ne._)`${n} === "boolean" || ${o} === null
|
|
4
4
|
|| (${n} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(a,(0,ne._)`+${o}`);return;case"boolean":s.elseIf((0,ne._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(a,!1).elseIf((0,ne._)`${o} === "true" || ${o} === 1`).assign(a,!0);return;case"null":s.elseIf((0,ne._)`${o} === "" || ${o} === 0 || ${o} === false`),s.assign(a,null);return;case"array":s.elseIf((0,ne._)`${n} === "string" || ${n} === "number"
|