marketplacepos 2.9.5 → 2.9.7

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.
Files changed (71) hide show
  1. package/Marketplace/103.bd9a1f982b50e346.js +1 -0
  2. package/Marketplace/168.372c8292de413867.js +1 -0
  3. package/Marketplace/231.0c7ab993977632a2.js +1 -0
  4. package/Marketplace/257.d1592e885695ba4b.js +1 -0
  5. package/Marketplace/278.e89610409641d910.js +1 -0
  6. package/Marketplace/296.93310f70e5f9d3a9.js +1 -0
  7. package/Marketplace/299.86cba892502ce6e4.js +1 -0
  8. package/Marketplace/307.494dace4c75f3987.js +1 -0
  9. package/Marketplace/311.17b5fcab2ef01d3f.js +1 -0
  10. package/Marketplace/389.f73b3c5db7bdf654.js +1 -0
  11. package/Marketplace/3rdpartylicenses.txt +1 -1
  12. package/Marketplace/445.8f1497373c95bb64.js +1 -0
  13. package/Marketplace/452.12b65c3c6f144b7e.js +1 -0
  14. package/Marketplace/476.d08ef7b92327904d.js +1 -0
  15. package/Marketplace/478.bdd1c6271d13e6fc.js +1 -0
  16. package/Marketplace/500.c2e6963e4771761e.js +1 -0
  17. package/Marketplace/527.e23646167d384e97.js +1 -0
  18. package/Marketplace/556.5d624cfb73f161b2.js +1 -0
  19. package/Marketplace/56.0432dfcbb3e04e39.js +1 -0
  20. package/Marketplace/599.8de0c2b4c7af0f9d.js +1 -0
  21. package/Marketplace/617.4db1b737553fe58b.js +1 -0
  22. package/Marketplace/62.4f9a8ca2692bdd97.js +1 -0
  23. package/Marketplace/671.8d5ec5d95df1c8e5.js +1 -0
  24. package/Marketplace/699.e1f8489991913e8e.js +1 -0
  25. package/Marketplace/726.318498721a0c771c.js +1 -0
  26. package/Marketplace/810.af61302495e16f98.js +1 -0
  27. package/Marketplace/877.bbdea3b04cc75780.js +1 -0
  28. package/Marketplace/900.f4171c8753af159f.js +1 -0
  29. package/Marketplace/967.2b39f548c7f4eb30.js +1 -0
  30. package/Marketplace/common.91711b840b02b984.js +1 -0
  31. package/Marketplace/index.html +6 -5
  32. package/Marketplace/main.9ef14d5cfe5be8d5.js +1 -0
  33. package/Marketplace/polyfills.503b3f4bf922d237.js +1 -0
  34. package/Marketplace/runtime.d8765e35f501b572.js +1 -0
  35. package/Marketplace/scripts.3e75d50128144df1.js +1 -0
  36. package/Marketplace/styles.7f496be7a7c4b295.css +19 -0
  37. package/package.json +1 -1
  38. package/Marketplace/174.491c4991a4f8e404.js +0 -1
  39. package/Marketplace/19.124a066645320965.js +0 -1
  40. package/Marketplace/213.0e33a2cc7393deb2.js +0 -1
  41. package/Marketplace/277.e644e3531765ce65.js +0 -1
  42. package/Marketplace/360.5c7b51c35e7142e7.js +0 -1
  43. package/Marketplace/369.a1e3b731aeb5243f.js +0 -1
  44. package/Marketplace/379.25d1b1c637903c75.js +0 -1
  45. package/Marketplace/392.f4537160149f627a.js +0 -1
  46. package/Marketplace/397.c1a8fad6c2ca3235.js +0 -1
  47. package/Marketplace/425.03f8f97da7452806.js +0 -1
  48. package/Marketplace/455.c9dd08adf08a1b65.js +0 -1
  49. package/Marketplace/46.40ebac81bd0fb91b.js +0 -1
  50. package/Marketplace/481.64ffd74d20798f93.js +0 -1
  51. package/Marketplace/501.7645c32a140dd7f8.js +0 -1
  52. package/Marketplace/512.52dc49022c04fa43.js +0 -1
  53. package/Marketplace/53.3655b31ecb37ade9.js +0 -1
  54. package/Marketplace/545.4809f373cc63f3b4.js +0 -1
  55. package/Marketplace/717.5d253da5bb63552f.js +0 -1
  56. package/Marketplace/72.23b7f31fc45323cb.js +0 -1
  57. package/Marketplace/739.0de1f18deac0ed90.js +0 -1
  58. package/Marketplace/754.086e7f7a5377c7d9.js +0 -1
  59. package/Marketplace/767.64dd12e70c78eb25.js +0 -1
  60. package/Marketplace/835.ea5f86512592f641.js +0 -1
  61. package/Marketplace/859.3a4d26983bbb5254.js +0 -1
  62. package/Marketplace/874.1fbcd1001b41f18e.js +0 -1
  63. package/Marketplace/913.ec8155bc121fb0a6.js +0 -1
  64. package/Marketplace/993.5c22ca4b00b8c459.js +0 -1
  65. package/Marketplace/997.1e5281aa64540dee.js +0 -1
  66. package/Marketplace/common.1b119d9b7a972f87.js +0 -1
  67. package/Marketplace/main.cbb985d0c847641f.js +0 -1
  68. package/Marketplace/polyfills.bee3c4d96e890990.js +0 -1
  69. package/Marketplace/runtime.8ddf6965934d46b2.js +0 -1
  70. package/Marketplace/scripts.b7cebc1258dbcca8.js +0 -1
  71. package/Marketplace/styles.97105d62c44869cb.css +0 -20
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[481],{8703:(ne,H,f)=>{f.d(H,{G:()=>e});var e=(()=>{return(S=e||(e={})).dashboardView="Dashboard",S.price="Price",S.channelView="ChannelView",S.channelAdd="ChannelAdd",S.channelEdit="ChannelEdit",S.channelDelete="ChannelDelete",S.orderView="OrderView",S.downloadOrder="DownloadOrder",e;var S})()},4968:(ne,H,f)=>{f.d(H,{R:()=>p});var e=f(8421),S=f(9751),T=f(5577),P=f(1144),I=f(576),U=f(3268);const L=["addListener","removeListener"],V=["addEventListener","removeEventListener"],M=["on","off"];function p(v,y,m,_){if((0,I.m)(m)&&(_=m,m=void 0),_)return p(v,y,m).pipe((0,U.Z)(_));const[E,Y]=function x(v){return(0,I.m)(v.addEventListener)&&(0,I.m)(v.removeEventListener)}(v)?V.map(z=>q=>v[z](y,q,m)):function C(v){return(0,I.m)(v.addListener)&&(0,I.m)(v.removeListener)}(v)?L.map(A(v,y)):function D(v){return(0,I.m)(v.on)&&(0,I.m)(v.off)}(v)?M.map(A(v,y)):[];if(!E&&(0,P.z)(v))return(0,T.z)(z=>p(z,y,m))((0,e.Xf)(v));if(!E)throw new TypeError("Invalid event target");return new S.y(z=>{const q=(...K)=>z.next(1<K.length?K:K[0]);return E(q),()=>Y(q)})}function A(v,y){return m=>_=>v[m](y,_)}},3601:(ne,H,f)=>{f.d(H,{e:()=>L});var e=f(4986),S=f(4482),T=f(8421),P=f(5403),U=f(2805);function L(V,M=e.z){return function I(V){return(0,S.e)((M,p)=>{let A=!1,C=null,D=null,x=!1;const v=()=>{if(D?.unsubscribe(),D=null,A){A=!1;const m=C;C=null,p.next(m)}x&&p.complete()},y=()=>{D=null,x&&p.complete()};M.subscribe((0,P.x)(p,m=>{A=!0,C=m,D||(0,T.Xf)(V(m)).subscribe(D=(0,P.x)(p,v,y))},()=>{x=!0,(!A||!D||D.closed)&&p.complete()}))})}(()=>(0,U.H)(V,M))}},6406:(ne,H,f)=>{f.d(H,{Z:()=>L});var e=f(4408),S=f(727);const T={schedule(M){let p=requestAnimationFrame,A=cancelAnimationFrame;const{delegate:C}=T;C&&(p=C.requestAnimationFrame,A=C.cancelAnimationFrame);const D=p(x=>{A=void 0,M(x)});return new S.w0(()=>A?.(D))},requestAnimationFrame(...M){const{delegate:p}=T;return(p?.requestAnimationFrame||requestAnimationFrame)(...M)},cancelAnimationFrame(...M){const{delegate:p}=T;return(p?.cancelAnimationFrame||cancelAnimationFrame)(...M)},delegate:void 0};var I=f(7565);const L=new class U extends I.v{flush(p){this._active=!0;const A=this._scheduled;this._scheduled=void 0;const{actions:C}=this;let D;p=p||C.shift();do{if(D=p.execute(p.state,p.delay))break}while((p=C[0])&&p.id===A&&C.shift());if(this._active=!1,D){for(;(p=C[0])&&p.id===A&&C.shift();)p.unsubscribe();throw D}}}(class P extends e.o{constructor(p,A){super(p,A),this.scheduler=p,this.work=A}requestAsyncId(p,A,C=0){return null!==C&&C>0?super.requestAsyncId(p,A,C):(p.actions.push(this),p._scheduled||(p._scheduled=T.requestAnimationFrame(()=>p.flush(void 0))))}recycleAsyncId(p,A,C=0){if(null!=C&&C>0||null==C&&this.delay>0)return super.recycleAsyncId(p,A,C);p.actions.some(D=>D.id===A)||(T.cancelAnimationFrame(A),p._scheduled=void 0)}})},3101:(ne,H,f)=>{f.d(H,{E:()=>x});var e=f(4408);let T,S=1;const P={};function I(y){return y in P&&(delete P[y],!0)}const U={setImmediate(y){const m=S++;return P[m]=!0,T||(T=Promise.resolve()),T.then(()=>I(m)&&y()),m},clearImmediate(y){I(y)}},{setImmediate:V,clearImmediate:M}=U,p={setImmediate(...y){const{delegate:m}=p;return(m?.setImmediate||V)(...y)},clearImmediate(y){const{delegate:m}=p;return(m?.clearImmediate||M)(y)},delegate:void 0};var C=f(7565);const x=new class D extends C.v{flush(m){this._active=!0;const _=this._scheduled;this._scheduled=void 0;const{actions:E}=this;let Y;m=m||E.shift();do{if(Y=m.execute(m.state,m.delay))break}while((m=E[0])&&m.id===_&&E.shift());if(this._active=!1,Y){for(;(m=E[0])&&m.id===_&&E.shift();)m.unsubscribe();throw Y}}}(class A extends e.o{constructor(m,_){super(m,_),this.scheduler=m,this.work=_}requestAsyncId(m,_,E=0){return null!==E&&E>0?super.requestAsyncId(m,_,E):(m.actions.push(this),m._scheduled||(m._scheduled=p.setImmediate(m.flush.bind(m,void 0))))}recycleAsyncId(m,_,E=0){if(null!=E&&E>0||null==E&&this.delay>0)return super.recycleAsyncId(m,_,E);m.actions.some(Y=>Y.id===_)||(p.clearImmediate(_),m._scheduled=void 0)}})},4006:(ne,H,f)=>{f.d(H,{Cf:()=>_,EJ:()=>ze,F:()=>We,Fj:()=>x,JJ:()=>Pe,JL:()=>Ge,JU:()=>V,Kr:()=>jt,On:()=>lt,Q7:()=>$e,UX:()=>On,Wl:()=>p,YN:()=>Ut,Zs:()=>pt,_Y:()=>Nt,a5:()=>j,c5:()=>gt,gN:()=>N,kI:()=>z,on:()=>mt,sg:()=>qe,u5:()=>Sn,wV:()=>at});var e=f(4650),S=f(6895),T=f(8996),P=f(4128),I=f(4004);let U=(()=>{class s{constructor(t,r){this._renderer=t,this._elementRef=r,this.onChange=c=>{},this.onTouched=()=>{}}setProperty(t,r){this._renderer.setProperty(this._elementRef.nativeElement,t,r)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(e.Qsj),e.Y36(e.SBq))},s.\u0275dir=e.lG2({type:s}),s})(),L=(()=>{class s extends U{}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,features:[e.qOj]}),s})();const V=new e.OlP("NgValueAccessor"),M={provide:V,useExisting:(0,e.Gpc)(()=>p),multi:!0};let p=(()=>{class s extends L{writeValue(t){this.setProperty("checked",t)}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,r){1&t&&e.NdJ("change",function(g){return r.onChange(g.target.checked)})("blur",function(){return r.onTouched()})},features:[e._Bn([M]),e.qOj]}),s})();const A={provide:V,useExisting:(0,e.Gpc)(()=>x),multi:!0},D=new e.OlP("CompositionEventMode");let x=(()=>{class s extends U{constructor(t,r,c){super(t,r),this._compositionMode=c,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function C(){const s=(0,S.q)()?(0,S.q)().getUserAgent():"";return/android (\d+)/.test(s.toLowerCase())}())}writeValue(t){this.setProperty("value",t??"")}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(e.Qsj),e.Y36(e.SBq),e.Y36(D,8))},s.\u0275dir=e.lG2({type:s,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(t,r){1&t&&e.NdJ("input",function(g){return r._handleInput(g.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(g){return r._compositionEnd(g.target.value)})},features:[e._Bn([A]),e.qOj]}),s})();function y(s){return null==s||("string"==typeof s||Array.isArray(s))&&0===s.length}function m(s){return null!=s&&"number"==typeof s.length}const _=new e.OlP("NgValidators"),E=new e.OlP("NgAsyncValidators"),Y=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class z{static min(n){return function q(s){return n=>{if(y(n.value)||y(s))return null;const t=parseFloat(n.value);return!isNaN(t)&&t<s?{min:{min:s,actual:n.value}}:null}}(n)}static max(n){return function K(s){return n=>{if(y(n.value)||y(s))return null;const t=parseFloat(n.value);return!isNaN(t)&&t>s?{max:{max:s,actual:n.value}}:null}}(n)}static required(n){return ve(n)}static requiredTrue(n){return Ce(n)}static email(n){return ye(n)}static minLength(n){return function Ee(s){return n=>y(n.value)||!m(n.value)?null:n.value.length<s?{minlength:{requiredLength:s,actualLength:n.value.length}}:null}(n)}static maxLength(n){return function Ae(s){return n=>m(n.value)&&n.value.length>s?{maxlength:{requiredLength:s,actualLength:n.value.length}}:null}(n)}static pattern(n){return be(n)}static nullValidator(n){return null}static compose(n){return Se(n)}static composeAsync(n){return Oe(n)}}function ve(s){return y(s.value)?{required:!0}:null}function Ce(s){return!0===s.value?null:{required:!0}}function ye(s){return y(s.value)||Y.test(s.value)?null:{email:!0}}function be(s){if(!s)return ie;let n,t;return"string"==typeof s?(t="","^"!==s.charAt(0)&&(t+="^"),t+=s,"$"!==s.charAt(s.length-1)&&(t+="$"),n=new RegExp(t)):(t=s.toString(),n=s),r=>{if(y(r.value))return null;const c=r.value;return n.test(c)?null:{pattern:{requiredPattern:t,actualValue:c}}}}function ie(s){return null}function De(s){return null!=s}function Fe(s){return(0,e.QGY)(s)?(0,T.D)(s):s}function Te(s){let n={};return s.forEach(t=>{n=null!=t?{...n,...t}:n}),0===Object.keys(n).length?null:n}function Ve(s,n){return n.map(t=>t(s))}function we(s){return s.map(n=>function Ke(s){return!s.validate}(n)?n:t=>n.validate(t))}function Se(s){if(!s)return null;const n=s.filter(De);return 0==n.length?null:function(t){return Te(Ve(t,n))}}function ue(s){return null!=s?Se(we(s)):null}function Oe(s){if(!s)return null;const n=s.filter(De);return 0==n.length?null:function(t){const r=Ve(t,n).map(Fe);return(0,P.D)(r).pipe((0,I.U)(Te))}}function ce(s){return null!=s?Oe(we(s)):null}function Me(s,n){return null===s?[n]:Array.isArray(s)?[...s,n]:[s,n]}function Ie(s){return s._rawValidators}function xe(s){return s._rawAsyncValidators}function de(s){return s?Array.isArray(s)?s:[s]:[]}function se(s,n){return Array.isArray(s)?s.includes(n):s===n}function Ne(s,n){const t=de(n);return de(s).forEach(c=>{se(t,c)||t.push(c)}),t}function Be(s,n){return de(n).filter(t=>!se(s,t))}class ke{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=ue(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=ce(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n){this.control&&this.control.reset(n)}hasError(n,t){return!!this.control&&this.control.hasError(n,t)}getError(n,t){return this.control?this.control.getError(n,t):null}}class N extends ke{get formDirective(){return null}get path(){return null}}class j extends ke{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Le{constructor(n){this._cd=n}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let Pe=(()=>{class s extends Le{constructor(t){super(t)}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(j,2))},s.\u0275dir=e.lG2({type:s,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,r){2&t&&e.ekj("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)},features:[e.qOj]}),s})(),Ge=(()=>{class s extends Le{constructor(t){super(t)}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(N,10))},s.\u0275dir=e.lG2({type:s,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(t,r){2&t&&e.ekj("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)},features:[e.qOj]}),s})();const X="VALID",$="INVALID",J="PENDING",k="DISABLED";function le(s){return(ee(s)?s.validators:s)||null}function me(s,n){return(ee(n)?n.asyncValidators:s)||null}function ee(s){return null!=s&&!Array.isArray(s)&&"object"==typeof s}class ge{constructor(n,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(n),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get valid(){return this.status===X}get invalid(){return this.status===$}get pending(){return this.status==J}get disabled(){return this.status===k}get enabled(){return this.status!==k}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(Ne(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(Ne(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(Be(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(Be(n,this._rawAsyncValidators))}hasValidator(n){return se(this._rawValidators,n)}hasAsyncValidator(n){return se(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){this.touched=!0,this._parent&&!n.onlySelf&&this._parent.markAsTouched(n)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(n=>n.markAllAsTouched())}markAsUntouched(n={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}markAsDirty(n={}){this.pristine=!1,this._parent&&!n.onlySelf&&this._parent.markAsDirty(n)}markAsPristine(n={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}markAsPending(n={}){this.status=J,!1!==n.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!n.onlySelf&&this._parent.markAsPending(n)}disable(n={}){const t=this._parentMarkedDirty(n.onlySelf);this.status=k,this.errors=null,this._forEachChild(r=>{r.disable({...n,onlySelf:!0})}),this._updateValue(),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...n,skipPristineCheck:t}),this._onDisabledChange.forEach(r=>r(!0))}enable(n={}){const t=this._parentMarkedDirty(n.onlySelf);this.status=X,this._forEachChild(r=>{r.enable({...n,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors({...n,skipPristineCheck:t}),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(n){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===X||this.status===J)&&this._runAsyncValidator(n.emitEvent)),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(n)}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?k:X}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n){if(this.asyncValidator){this.status=J,this._hasOwnPendingAsyncValidator=!0;const t=Fe(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(r=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(r,{emitEvent:n})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(n,t={}){this.errors=n,this._updateControlsErrors(!1!==t.emitEvent)}get(n){let t=n;return null==t||(Array.isArray(t)||(t=t.split(".")),0===t.length)?null:t.reduce((r,c)=>r&&r._find(c),this)}getError(n,t){const r=t?this.get(t):this;return r&&r.errors?r.errors[n]:null}hasError(n,t){return!!this.getError(n,t)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(n)}_initObservables(){this.valueChanges=new e.vpe,this.statusChanges=new e.vpe}_calculateStatus(){return this._allControlsDisabled()?k:this.errors?$:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(J)?J:this._anyControlsHaveStatus($)?$:X}_anyControlsHaveStatus(n){return this._anyControls(t=>t.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n={}){this.pristine=!this._anyControlsDirty(),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}_updateTouched(n={}){this.touched=this._anyControlsTouched(),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){ee(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=function He(s){return Array.isArray(s)?ue(s):s||null}(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=function Ue(s){return Array.isArray(s)?ce(s):s||null}(this._rawAsyncValidators)}}class fe extends ge{constructor(n,t,r){super(le(t),me(r,t)),this.controls=n,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,t){return this.controls[n]?this.controls[n]:(this.controls[n]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(n,t,r={}){this.registerControl(n,t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(n,t={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(n,t,r={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],t&&this.registerControl(n,t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,t={}){(function je(s,n,t){s._forEachChild((r,c)=>{if(void 0===t[c])throw new e.vHH(1002,"")})})(this,0,n),Object.keys(n).forEach(r=>{(function Ye(s,n,t){const r=s.controls;if(!(n?Object.keys(r):r).length)throw new e.vHH(1e3,"");if(!r[t])throw new e.vHH(1001,"")})(this,!0,r),this.controls[r].setValue(n[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(n,t={}){null!=n&&(Object.keys(n).forEach(r=>{const c=this.controls[r];c&&c.patchValue(n[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(n={},t={}){this._forEachChild((r,c)=>{r.reset(n[c],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(n,t,r)=>(n[r]=t.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(t,r)=>!!r._syncPendingControls()||t);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(t=>{const r=this.controls[t];r&&n(r,t)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(const[t,r]of Object.entries(this.controls))if(this.contains(t)&&n(r))return!0;return!1}_reduceValue(){return this._reduceChildren({},(t,r,c)=>((r.enabled||this.disabled)&&(t[c]=r.value),t))}_reduceChildren(n,t){let r=n;return this._forEachChild((c,g)=>{r=t(r,c,g)}),r}_allControlsDisabled(){for(const n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}}const a=new e.OlP("CallSetDisabledState",{providedIn:"root",factory:()=>i}),i="always";function u(s,n,t=i){O(s,n),n.valueAccessor.writeValue(s.value),(s.disabled||"always"===t)&&n.valueAccessor.setDisabledState?.(s.disabled),function W(s,n){n.valueAccessor.registerOnChange(t=>{s._pendingValue=t,s._pendingChange=!0,s._pendingDirty=!0,"change"===s.updateOn&&G(s,n)})}(s,n),function ae(s,n){const t=(r,c)=>{n.valueAccessor.writeValue(r),c&&n.viewToModelUpdate(r)};s.registerOnChange(t),n._registerOnDestroy(()=>{s._unregisterOnChange(t)})}(s,n),function R(s,n){n.valueAccessor.registerOnTouched(()=>{s._pendingTouched=!0,"blur"===s.updateOn&&s._pendingChange&&G(s,n),"submit"!==s.updateOn&&s.markAsTouched()})}(s,n),function b(s,n){if(n.valueAccessor.setDisabledState){const t=r=>{n.valueAccessor.setDisabledState(r)};s.registerOnDisabledChange(t),n._registerOnDestroy(()=>{s._unregisterOnDisabledChange(t)})}}(s,n)}function d(s,n,t=!0){const r=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(r),n.valueAccessor.registerOnTouched(r)),w(s,n),s&&(n._invokeOnDestroyCallbacks(),s._registerOnCollectionChange(()=>{}))}function h(s,n){s.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(n)})}function O(s,n){const t=Ie(s);null!==n.validator?s.setValidators(Me(t,n.validator)):"function"==typeof t&&s.setValidators([t]);const r=xe(s);null!==n.asyncValidator?s.setAsyncValidators(Me(r,n.asyncValidator)):"function"==typeof r&&s.setAsyncValidators([r]);const c=()=>s.updateValueAndValidity();h(n._rawValidators,c),h(n._rawAsyncValidators,c)}function w(s,n){let t=!1;if(null!==s){if(null!==n.validator){const c=Ie(s);if(Array.isArray(c)&&c.length>0){const g=c.filter(B=>B!==n.validator);g.length!==c.length&&(t=!0,s.setValidators(g))}}if(null!==n.asyncValidator){const c=xe(s);if(Array.isArray(c)&&c.length>0){const g=c.filter(B=>B!==n.asyncValidator);g.length!==c.length&&(t=!0,s.setAsyncValidators(g))}}}const r=()=>{};return h(n._rawValidators,r),h(n._rawAsyncValidators,r),t}function G(s,n){s._pendingDirty&&s.markAsDirty(),s.setValue(s._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(s._pendingValue),s._pendingChange=!1}function Tt(s,n){O(s,n)}function Vt(s,n){s._syncPendingControls(),n.forEach(t=>{const r=t.control;"submit"===r.updateOn&&r._pendingChange&&(t.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}const nn={provide:N,useExisting:(0,e.Gpc)(()=>We)},_e=(()=>Promise.resolve())();let We=(()=>{class s extends N{constructor(t,r,c){super(),this.callSetDisabledState=c,this.submitted=!1,this._directives=new Set,this.ngSubmit=new e.vpe,this.form=new fe({},ue(t),ce(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){_e.then(()=>{const r=this._findContainer(t.path);t.control=r.registerControl(t.name,t.control),u(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){_e.then(()=>{const r=this._findContainer(t.path);r&&r.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){_e.then(()=>{const r=this._findContainer(t.path),c=new fe({});Tt(c,t),r.registerControl(t.name,c),c.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){_e.then(()=>{const r=this._findContainer(t.path);r&&r.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,r){_e.then(()=>{this.form.get(t.path).setValue(r)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,Vt(this.form,this._directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(_,10),e.Y36(E,10),e.Y36(a,8))},s.\u0275dir=e.lG2({type:s,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,r){1&t&&e.NdJ("submit",function(g){return r.onSubmit(g)})("reset",function(){return r.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[e._Bn([nn]),e.qOj]}),s})();function wt(s,n){const t=s.indexOf(n);t>-1&&s.splice(t,1)}function St(s){return"object"==typeof s&&null!==s&&2===Object.keys(s).length&&"value"in s&&"disabled"in s}const Ot=class extends ge{constructor(n=null,t,r){super(le(t),me(r,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(n),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),ee(t)&&(t.nonNullable||t.initialValueIsDefault)&&(this.defaultValue=St(n)?n.value:n)}setValue(n,t={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(r=>r(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(n,t={}){this.setValue(n,t)}reset(n=this.defaultValue,t={}){this._applyFormState(n),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){wt(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){wt(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(n){St(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}},on={provide:j,useExisting:(0,e.Gpc)(()=>lt)},xt=(()=>Promise.resolve())();let lt=(()=>{class s extends j{constructor(t,r,c,g,B,Z){super(),this._changeDetectorRef=B,this.callSetDisabledState=Z,this.control=new Ot,this._registered=!1,this.update=new e.vpe,this._parent=t,this._setValidators(r),this._setAsyncValidators(c),this.valueAccessor=function ot(s,n){if(!n)return null;let t,r,c;return Array.isArray(n),n.forEach(g=>{g.constructor===x?t=g:function en(s){return Object.getPrototypeOf(s.constructor)===L}(g)?r=g:c=g}),c||r||t||null}(0,g)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){const r=t.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),function rt(s,n){if(!s.hasOwnProperty("model"))return!1;const t=s.model;return!!t.isFirstChange()||!Object.is(n,t.currentValue)}(t,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(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){u(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(t){xt.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){const r=t.isDisabled.currentValue,c=0!==r&&(0,e.D6c)(r);xt.then(()=>{c&&!this.control.disabled?this.control.disable():!c&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?function o(s,n){return[...n.path,s]}(t,this._parent):[t]}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(N,9),e.Y36(_,10),e.Y36(E,10),e.Y36(V,10),e.Y36(e.sBO,8),e.Y36(a,8))},s.\u0275dir=e.lG2({type:s,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[e._Bn([on]),e.qOj,e.TTD]}),s})(),Nt=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275dir=e.lG2({type:s,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),s})();const ln={provide:V,useExisting:(0,e.Gpc)(()=>at),multi:!0};let at=(()=>{class s extends L{writeValue(t){this.setProperty("value",t??"")}registerOnChange(t){this.onChange=r=>{t(""==r?null:parseFloat(r))}}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,r){1&t&&e.NdJ("input",function(g){return r.onChange(g.target.value)})("blur",function(){return r.onTouched()})},features:[e._Bn([ln]),e.qOj]}),s})(),Bt=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({}),s})();const ut=new e.OlP("NgModelWithFormControlWarning"),hn={provide:N,useExisting:(0,e.Gpc)(()=>qe)};let qe=(()=>{class s extends N{constructor(t,r,c){super(),this.callSetDisabledState=c,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new e.vpe,this._setValidators(t),this._setAsyncValidators(r)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(w(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const r=this.form.get(t.path);return u(r,t,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),r}getControl(t){return this.form.get(t.path)}removeControl(t){d(t.control||null,t,!1),function tn(s,n){const t=s.indexOf(n);t>-1&&s.splice(t,1)}(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,r){this.form.get(t.path).setValue(r)}onSubmit(t){return this.submitted=!0,Vt(this.form,this.directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const r=t.control,c=this.form.get(t.path);r!==c&&(d(r||null,t),(s=>s instanceof Ot)(c)&&(u(c,t,this.callSetDisabledState),t.control=c))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){const r=this.form.get(t.path);Tt(r,t),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){const r=this.form.get(t.path);r&&function Qt(s,n){return w(s,n)}(r,t)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){O(this.form,this),this._oldForm&&w(this._oldForm,this)}_checkFormPresent(){}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(_,10),e.Y36(E,10),e.Y36(a,8))},s.\u0275dir=e.lG2({type:s,selectors:[["","formGroup",""]],hostBindings:function(t,r){1&t&&e.NdJ("submit",function(g){return r.onSubmit(g)})("reset",function(){return r.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[e._Bn([hn]),e.qOj,e.TTD]}),s})();const fn={provide:V,useExisting:(0,e.Gpc)(()=>ze),multi:!0};function Ht(s,n){return null==s?`${n}`:(n&&"object"==typeof n&&(n="Object"),`${s}: ${n}`.slice(0,50))}let ze=(()=>{class s extends L{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){this.value=t;const c=Ht(this._getOptionId(t),t);this.setProperty("value",c)}registerOnChange(t){this.onChange=r=>{this.value=this._getOptionValue(r),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(const r of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(r),t))return r;return null}_getOptionValue(t){const r=function _n(s){return s.split(":")[0]}(t);return this._optionMap.has(r)?this._optionMap.get(r):t}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(t,r){1&t&&e.NdJ("change",function(g){return r.onChange(g.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[e._Bn([fn]),e.qOj]}),s})(),Ut=(()=>{class s{constructor(t,r,c){this._element=t,this._renderer=r,this._select=c,this._select&&(this.id=this._select._registerOption())}set ngValue(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(Ht(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(e.SBq),e.Y36(e.Qsj),e.Y36(ze,9))},s.\u0275dir=e.lG2({type:s,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),s})();const vn={provide:V,useExisting:(0,e.Gpc)(()=>ht),multi:!0};function Yt(s,n){return null==s?`${n}`:("string"==typeof n&&(n=`'${n}'`),n&&"object"==typeof n&&(n="Object"),`${s}: ${n}`.slice(0,50))}let ht=(()=>{class s extends L{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){let r;if(this.value=t,Array.isArray(t)){const c=t.map(g=>this._getOptionId(g));r=(g,B)=>{g._setSelected(c.indexOf(B.toString())>-1)}}else r=(c,g)=>{c._setSelected(!1)};this._optionMap.forEach(r)}registerOnChange(t){this.onChange=r=>{const c=[],g=r.selectedOptions;if(void 0!==g){const B=g;for(let Z=0;Z<B.length;Z++){const ft=this._getOptionValue(B[Z].value);c.push(ft)}}else{const B=r.options;for(let Z=0;Z<B.length;Z++){const Ze=B[Z];if(Ze.selected){const ft=this._getOptionValue(Ze.value);c.push(ft)}}}this.value=c,t(c)}}_registerOption(t){const r=(this._idCounter++).toString();return this._optionMap.set(r,t),r}_getOptionId(t){for(const r of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(r)._value,t))return r;return null}_getOptionValue(t){const r=function Cn(s){return s.split(":")[0]}(t);return this._optionMap.has(r)?this._optionMap.get(r)._value:t}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(t,r){1&t&&e.NdJ("change",function(g){return r.onChange(g.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[e._Bn([vn]),e.qOj]}),s})(),jt=(()=>{class s{constructor(t,r,c){this._element=t,this._renderer=r,this._select=c,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){null!=this._select&&(this._value=t,this._setElementValue(Yt(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(Yt(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(e.SBq),e.Y36(e.Qsj),e.Y36(ht,9))},s.\u0275dir=e.lG2({type:s,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),s})(),te=(()=>{class s{constructor(){this._validator=ie}ngOnChanges(t){if(this.inputName in t){const r=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(r),this._validator=this._enabled?this.createValidator(r):ie,this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return null!=t}}return s.\u0275fac=function(t){return new(t||s)},s.\u0275dir=e.lG2({type:s,features:[e.TTD]}),s})();const An={provide:_,useExisting:(0,e.Gpc)(()=>$e),multi:!0},bn={provide:_,useExisting:(0,e.Gpc)(()=>pt),multi:!0};let $e=(()=>{class s extends te{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=e.D6c,this.createValidator=t=>ve}enabled(t){return t}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,r){2&t&&e.uIk("required",r._enabled?"":null)},inputs:{required:"required"},features:[e._Bn([An]),e.qOj]}),s})(),pt=(()=>{class s extends $e{constructor(){super(...arguments),this.createValidator=t=>Ce}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(t,r){2&t&&e.uIk("required",r._enabled?"":null)},features:[e._Bn([bn]),e.qOj]}),s})();const Dn={provide:_,useExisting:(0,e.Gpc)(()=>mt),multi:!0};let mt=(()=>{class s extends te{constructor(){super(...arguments),this.inputName="email",this.normalizeInput=e.D6c,this.createValidator=t=>ye}enabled(t){return t}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[e._Bn([Dn]),e.qOj]}),s})();const Vn={provide:_,useExisting:(0,e.Gpc)(()=>gt),multi:!0};let gt=(()=>{class s extends te{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=t=>t,this.createValidator=t=>be(t)}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(t,r){2&t&&e.uIk("pattern",r._enabled?r.pattern:null)},inputs:{pattern:"pattern"},features:[e._Bn([Vn]),e.qOj]}),s})(),Jt=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({imports:[Bt]}),s})(),Sn=(()=>{class s{static withConfig(t){return{ngModule:s,providers:[{provide:a,useValue:t.callSetDisabledState??i}]}}}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({imports:[Jt]}),s})(),On=(()=>{class s{static withConfig(t){return{ngModule:s,providers:[{provide:ut,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:a,useValue:t.callSetDisabledState??i}]}}}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({imports:[Jt]}),s})()},8796:(ne,H,f)=>{f.d(H,{A0:()=>it,ir:()=>Qe,jq:()=>ee,w9:()=>fe});var e=f(4650),S=f(4006),T=f(2722),P=f(3601),I=f(8675),U=f(8505),L=f(8372),V=f(9300),M=f(4004),p=f(6406),A=f(3101),C=f(7579),D=f(4968),x=f(6451),v=f(6895);const y=["content"],m=["scroll"],_=["padding"],E=function(l){return{searchTerm:l}};function Y(l,a){if(1&l&&(e.TgZ(0,"div",6),e.GkF(1,7),e.qZA()),2&l){const i=e.oxw();e.xp6(1),e.Q6J("ngTemplateOutlet",i.headerTemplate)("ngTemplateOutletContext",e.VKq(2,E,i.filterValue))}}function z(l,a){if(1&l&&(e.TgZ(0,"div",8),e.GkF(1,7),e.qZA()),2&l){const i=e.oxw();e.xp6(1),e.Q6J("ngTemplateOutlet",i.footerTemplate)("ngTemplateOutletContext",e.VKq(2,E,i.filterValue))}}const q=["*"],K=["searchInput"];function ve(l,a){if(1&l){const i=e.EpF();e.TgZ(0,"span",15),e.NdJ("click",function(){e.CHM(i);const u=e.oxw().$implicit,d=e.oxw(2);return e.KtG(d.unselect(u))}),e._uU(1,"\xd7"),e.qZA(),e._UZ(2,"span",16)}if(2&l){const i=e.oxw().$implicit,o=e.oxw(2);e.xp6(2),e.Q6J("ngItemLabel",i.label)("escape",o.escapeHTML)}}function Ce(l,a){}const ye=function(l,a,i){return{item:l,clear:a,label:i}};function Ee(l,a){if(1&l&&(e.TgZ(0,"div",12),e.YNc(1,ve,3,2,"ng-template",null,13,e.W1O),e.YNc(3,Ce,0,0,"ng-template",14),e.qZA()),2&l){const i=a.$implicit,o=e.MAs(2),u=e.oxw(2);e.ekj("ng-value-disabled",i.disabled),e.xp6(3),e.Q6J("ngTemplateOutlet",u.labelTemplate||o)("ngTemplateOutletContext",e.kEZ(4,ye,i.value,u.clearItem,i.label))}}function Ae(l,a){if(1&l&&(e.ynx(0),e.YNc(1,Ee,4,8,"div",11),e.BQk()),2&l){const i=e.oxw();e.xp6(1),e.Q6J("ngForOf",i.selectedItems)("ngForTrackBy",i.trackByOption)}}function be(l,a){}const ie=function(l,a){return{items:l,clear:a}};function De(l,a){if(1&l&&e.YNc(0,be,0,0,"ng-template",14),2&l){const i=e.oxw();e.Q6J("ngTemplateOutlet",i.multiLabelTemplate)("ngTemplateOutletContext",e.WLB(2,ie,i.selectedValues,i.clearItem))}}function Fe(l,a){1&l&&e._UZ(0,"div",19)}function Te(l,a){}function Ve(l,a){if(1&l&&(e.ynx(0),e.YNc(1,Fe,1,0,"ng-template",null,17,e.W1O),e.YNc(3,Te,0,0,"ng-template",18),e.BQk()),2&l){const i=e.MAs(2),o=e.oxw();e.xp6(3),e.Q6J("ngTemplateOutlet",o.loadingSpinnerTemplate||i)}}function Ke(l,a){if(1&l&&(e.TgZ(0,"span",20)(1,"span",21),e._uU(2,"\xd7"),e.qZA()()),2&l){const i=e.oxw();e.s9C("title",i.clearAllText)}}function we(l,a){if(1&l&&e._UZ(0,"span",27),2&l){const i=e.oxw().$implicit,o=e.oxw(2);e.Q6J("ngItemLabel",i.label)("escape",o.escapeHTML)}}function Se(l,a){}const ue=function(l,a,i,o){return{item:l,item$:a,index:i,searchTerm:o}};function Oe(l,a){if(1&l){const i=e.EpF();e.TgZ(0,"div",25),e.NdJ("click",function(){const d=e.CHM(i).$implicit,h=e.oxw(2);return e.KtG(h.toggleItem(d))})("mouseover",function(){const d=e.CHM(i).$implicit,h=e.oxw(2);return e.KtG(h.onItemHover(d))}),e.YNc(1,we,1,2,"ng-template",null,26,e.W1O),e.YNc(3,Se,0,0,"ng-template",14),e.qZA()}if(2&l){const i=a.$implicit,o=e.MAs(2),u=e.oxw(2);e.ekj("ng-option-disabled",i.disabled)("ng-option-selected",i.selected)("ng-optgroup",i.children)("ng-option",!i.children)("ng-option-child",!!i.parent)("ng-option-marked",i===u.itemsList.markedItem),e.uIk("role",i.children?"group":"option")("aria-selected",i.selected)("id",null==i?null:i.htmlId),e.xp6(3),e.Q6J("ngTemplateOutlet",i.children?u.optgroupTemplate||o:u.optionTemplate||o)("ngTemplateOutletContext",e.l5B(17,ue,i.value,i,i.index,u.searchTerm))}}function ce(l,a){if(1&l&&(e.TgZ(0,"span")(1,"span",30),e._uU(2),e.qZA(),e._uU(3),e.qZA()),2&l){const i=e.oxw(3);e.xp6(2),e.Oqu(i.addTagText),e.xp6(1),e.hij('"',i.searchTerm,'"')}}function Me(l,a){}function Ie(l,a){if(1&l){const i=e.EpF();e.TgZ(0,"div",28),e.NdJ("mouseover",function(){e.CHM(i);const u=e.oxw(2);return e.KtG(u.itemsList.unmarkItem())})("click",function(){e.CHM(i);const u=e.oxw(2);return e.KtG(u.selectTag())}),e.YNc(1,ce,4,2,"ng-template",null,29,e.W1O),e.YNc(3,Me,0,0,"ng-template",14),e.qZA()}if(2&l){const i=e.MAs(2),o=e.oxw(2);e.ekj("ng-option-marked",!o.itemsList.markedItem),e.xp6(3),e.Q6J("ngTemplateOutlet",o.tagTemplate||i)("ngTemplateOutletContext",e.VKq(4,E,o.searchTerm))}}function xe(l,a){if(1&l&&(e.TgZ(0,"div",32),e._uU(1),e.qZA()),2&l){const i=e.oxw(3);e.xp6(1),e.Oqu(i.notFoundText)}}function de(l,a){}function se(l,a){if(1&l&&(e.ynx(0),e.YNc(1,xe,2,1,"ng-template",null,31,e.W1O),e.YNc(3,de,0,0,"ng-template",14),e.BQk()),2&l){const i=e.MAs(2),o=e.oxw(2);e.xp6(3),e.Q6J("ngTemplateOutlet",o.notFoundTemplate||i)("ngTemplateOutletContext",e.VKq(2,E,o.searchTerm))}}function Ne(l,a){if(1&l&&(e.TgZ(0,"div",32),e._uU(1),e.qZA()),2&l){const i=e.oxw(3);e.xp6(1),e.Oqu(i.typeToSearchText)}}function Be(l,a){}function ke(l,a){if(1&l&&(e.ynx(0),e.YNc(1,Ne,2,1,"ng-template",null,33,e.W1O),e.YNc(3,Be,0,0,"ng-template",18),e.BQk()),2&l){const i=e.MAs(2),o=e.oxw(2);e.xp6(3),e.Q6J("ngTemplateOutlet",o.typeToSearchTemplate||i)}}function N(l,a){if(1&l&&(e.TgZ(0,"div",32),e._uU(1),e.qZA()),2&l){const i=e.oxw(3);e.xp6(1),e.Oqu(i.loadingText)}}function j(l,a){}function Le(l,a){if(1&l&&(e.ynx(0),e.YNc(1,N,2,1,"ng-template",null,34,e.W1O),e.YNc(3,j,0,0,"ng-template",14),e.BQk()),2&l){const i=e.MAs(2),o=e.oxw(2);e.xp6(3),e.Q6J("ngTemplateOutlet",o.loadingTextTemplate||i)("ngTemplateOutletContext",e.VKq(2,E,o.searchTerm))}}function _t(l,a){if(1&l){const i=e.EpF();e.TgZ(0,"ng-dropdown-panel",22),e.NdJ("update",function(u){e.CHM(i);const d=e.oxw();return e.KtG(d.viewPortItems=u)})("scroll",function(u){e.CHM(i);const d=e.oxw();return e.KtG(d.scroll.emit(u))})("scrollToEnd",function(u){e.CHM(i);const d=e.oxw();return e.KtG(d.scrollToEnd.emit(u))})("outsideClick",function(){e.CHM(i);const u=e.oxw();return e.KtG(u.close())}),e.ynx(1),e.YNc(2,Oe,4,22,"div",23),e.YNc(3,Ie,4,6,"div",24),e.BQk(),e.YNc(4,se,4,4,"ng-container",3),e.YNc(5,ke,4,1,"ng-container",3),e.YNc(6,Le,4,4,"ng-container",3),e.qZA()}if(2&l){const i=e.oxw();e.ekj("ng-select-multiple",i.multiple),e.Q6J("virtualScroll",i.virtualScroll)("bufferAmount",i.bufferAmount)("appendTo",i.appendTo)("position",i.dropdownPosition)("headerTemplate",i.headerTemplate)("footerTemplate",i.footerTemplate)("filterValue",i.searchTerm)("items",i.itemsList.filteredItems)("markedItem",i.itemsList.markedItem)("ngClass",i.appendTo?i.classes:null)("id",i.dropdownId),e.xp6(2),e.Q6J("ngForOf",i.viewPortItems)("ngForTrackBy",i.trackByOption),e.xp6(1),e.Q6J("ngIf",i.showAddTag),e.xp6(1),e.Q6J("ngIf",i.showNoItemsFound()),e.xp6(1),e.Q6J("ngIf",i.showTypeToSearch()),e.xp6(1),e.Q6J("ngIf",i.loading&&0===i.itemsList.filteredItems.length)}}const Je=/[&<>"']/g,Pe=RegExp(Je.source),Ge={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function F(l){return null!=l}function Q(l){return"object"==typeof l&&F(l)}function re(l){return l instanceof Function}let vt=(()=>{class l{constructor(i){this.element=i,this.escape=!0}ngOnChanges(i){this.element.nativeElement.innerHTML=this.escape?function he(l){return l&&Pe.test(l)?l.replace(Je,a=>Ge[a]):l}(this.ngItemLabel):this.ngItemLabel}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.SBq))},l.\u0275dir=e.lG2({type:l,selectors:[["","ngItemLabel",""]],inputs:{ngItemLabel:"ngItemLabel",escape:"escape"},features:[e.TTD]}),l})(),Qe=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-option-tmp",""]]}),l})(),Ct=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-optgroup-tmp",""]]}),l})(),yt=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-label-tmp",""]]}),l})(),Et=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-multi-label-tmp",""]]}),l})(),At=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-header-tmp",""]]}),l})(),bt=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-footer-tmp",""]]}),l})(),Xe=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-notfound-tmp",""]]}),l})(),Re=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-typetosearch-tmp",""]]}),l})(),et=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-loadingtext-tmp",""]]}),l})(),tt=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-tag-tmp",""]]}),l})(),nt=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-loadingspinner-tmp",""]]}),l})();function oe(){return"axxxxxxxxxxx".replace(/[x]/g,()=>(16*Math.random()|0).toString(16))}const X={"\u24b6":"A",\uff21:"A",\u00c0:"A",\u00c1:"A",\u00c2:"A",\u1ea6:"A",\u1ea4:"A",\u1eaa:"A",\u1ea8:"A",\u00c3:"A",\u0100:"A",\u0102:"A",\u1eb0:"A",\u1eae:"A",\u1eb4:"A",\u1eb2:"A",\u0226:"A",\u01e0:"A",\u00c4:"A",\u01de:"A",\u1ea2:"A",\u00c5:"A",\u01fa:"A",\u01cd:"A",\u0200:"A",\u0202:"A",\u1ea0:"A",\u1eac:"A",\u1eb6:"A",\u1e00:"A",\u0104:"A",\u023a:"A",\u2c6f:"A",\ua732:"AA",\u00c6:"AE",\u01fc:"AE",\u01e2:"AE",\ua734:"AO",\ua736:"AU",\ua738:"AV",\ua73a:"AV",\ua73c:"AY","\u24b7":"B",\uff22:"B",\u1e02:"B",\u1e04:"B",\u1e06:"B",\u0243:"B",\u0182:"B",\u0181:"B","\u24b8":"C",\uff23:"C",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u00c7:"C",\u1e08:"C",\u0187:"C",\u023b:"C",\ua73e:"C","\u24b9":"D",\uff24:"D",\u1e0a:"D",\u010e:"D",\u1e0c:"D",\u1e10:"D",\u1e12:"D",\u1e0e:"D",\u0110:"D",\u018b:"D",\u018a:"D",\u0189:"D",\ua779:"D",\u01f1:"DZ",\u01c4:"DZ",\u01f2:"Dz",\u01c5:"Dz","\u24ba":"E",\uff25:"E",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u1ec0:"E",\u1ebe:"E",\u1ec4:"E",\u1ec2:"E",\u1ebc:"E",\u0112:"E",\u1e14:"E",\u1e16:"E",\u0114:"E",\u0116:"E",\u00cb:"E",\u1eba:"E",\u011a:"E",\u0204:"E",\u0206:"E",\u1eb8:"E",\u1ec6:"E",\u0228:"E",\u1e1c:"E",\u0118:"E",\u1e18:"E",\u1e1a:"E",\u0190:"E",\u018e:"E","\u24bb":"F",\uff26:"F",\u1e1e:"F",\u0191:"F",\ua77b:"F","\u24bc":"G",\uff27:"G",\u01f4:"G",\u011c:"G",\u1e20:"G",\u011e:"G",\u0120:"G",\u01e6:"G",\u0122:"G",\u01e4:"G",\u0193:"G",\ua7a0:"G",\ua77d:"G",\ua77e:"G","\u24bd":"H",\uff28:"H",\u0124:"H",\u1e22:"H",\u1e26:"H",\u021e:"H",\u1e24:"H",\u1e28:"H",\u1e2a:"H",\u0126:"H",\u2c67:"H",\u2c75:"H",\ua78d:"H","\u24be":"I",\uff29:"I",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u0128:"I",\u012a:"I",\u012c:"I",\u0130:"I",\u00cf:"I",\u1e2e:"I",\u1ec8:"I",\u01cf:"I",\u0208:"I",\u020a:"I",\u1eca:"I",\u012e:"I",\u1e2c:"I",\u0197:"I","\u24bf":"J",\uff2a:"J",\u0134:"J",\u0248:"J","\u24c0":"K",\uff2b:"K",\u1e30:"K",\u01e8:"K",\u1e32:"K",\u0136:"K",\u1e34:"K",\u0198:"K",\u2c69:"K",\ua740:"K",\ua742:"K",\ua744:"K",\ua7a2:"K","\u24c1":"L",\uff2c:"L",\u013f:"L",\u0139:"L",\u013d:"L",\u1e36:"L",\u1e38:"L",\u013b:"L",\u1e3c:"L",\u1e3a:"L",\u0141:"L",\u023d:"L",\u2c62:"L",\u2c60:"L",\ua748:"L",\ua746:"L",\ua780:"L",\u01c7:"LJ",\u01c8:"Lj","\u24c2":"M",\uff2d:"M",\u1e3e:"M",\u1e40:"M",\u1e42:"M",\u2c6e:"M",\u019c:"M","\u24c3":"N",\uff2e:"N",\u01f8:"N",\u0143:"N",\u00d1:"N",\u1e44:"N",\u0147:"N",\u1e46:"N",\u0145:"N",\u1e4a:"N",\u1e48:"N",\u0220:"N",\u019d:"N",\ua790:"N",\ua7a4:"N",\u01ca:"NJ",\u01cb:"Nj","\u24c4":"O",\uff2f:"O",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u1ed2:"O",\u1ed0:"O",\u1ed6:"O",\u1ed4:"O",\u00d5:"O",\u1e4c:"O",\u022c:"O",\u1e4e:"O",\u014c:"O",\u1e50:"O",\u1e52:"O",\u014e:"O",\u022e:"O",\u0230:"O",\u00d6:"O",\u022a:"O",\u1ece:"O",\u0150:"O",\u01d1:"O",\u020c:"O",\u020e:"O",\u01a0:"O",\u1edc:"O",\u1eda:"O",\u1ee0:"O",\u1ede:"O",\u1ee2:"O",\u1ecc:"O",\u1ed8:"O",\u01ea:"O",\u01ec:"O",\u00d8:"O",\u01fe:"O",\u0186:"O",\u019f:"O",\ua74a:"O",\ua74c:"O",\u01a2:"OI",\ua74e:"OO",\u0222:"OU","\u24c5":"P",\uff30:"P",\u1e54:"P",\u1e56:"P",\u01a4:"P",\u2c63:"P",\ua750:"P",\ua752:"P",\ua754:"P","\u24c6":"Q",\uff31:"Q",\ua756:"Q",\ua758:"Q",\u024a:"Q","\u24c7":"R",\uff32:"R",\u0154:"R",\u1e58:"R",\u0158:"R",\u0210:"R",\u0212:"R",\u1e5a:"R",\u1e5c:"R",\u0156:"R",\u1e5e:"R",\u024c:"R",\u2c64:"R",\ua75a:"R",\ua7a6:"R",\ua782:"R","\u24c8":"S",\uff33:"S",\u1e9e:"S",\u015a:"S",\u1e64:"S",\u015c:"S",\u1e60:"S",\u0160:"S",\u1e66:"S",\u1e62:"S",\u1e68:"S",\u0218:"S",\u015e:"S",\u2c7e:"S",\ua7a8:"S",\ua784:"S","\u24c9":"T",\uff34:"T",\u1e6a:"T",\u0164:"T",\u1e6c:"T",\u021a:"T",\u0162:"T",\u1e70:"T",\u1e6e:"T",\u0166:"T",\u01ac:"T",\u01ae:"T",\u023e:"T",\ua786:"T",\ua728:"TZ","\u24ca":"U",\uff35:"U",\u00d9:"U",\u00da:"U",\u00db:"U",\u0168:"U",\u1e78:"U",\u016a:"U",\u1e7a:"U",\u016c:"U",\u00dc:"U",\u01db:"U",\u01d7:"U",\u01d5:"U",\u01d9:"U",\u1ee6:"U",\u016e:"U",\u0170:"U",\u01d3:"U",\u0214:"U",\u0216:"U",\u01af:"U",\u1eea:"U",\u1ee8:"U",\u1eee:"U",\u1eec:"U",\u1ef0:"U",\u1ee4:"U",\u1e72:"U",\u0172:"U",\u1e76:"U",\u1e74:"U",\u0244:"U","\u24cb":"V",\uff36:"V",\u1e7c:"V",\u1e7e:"V",\u01b2:"V",\ua75e:"V",\u0245:"V",\ua760:"VY","\u24cc":"W",\uff37:"W",\u1e80:"W",\u1e82:"W",\u0174:"W",\u1e86:"W",\u1e84:"W",\u1e88:"W",\u2c72:"W","\u24cd":"X",\uff38:"X",\u1e8a:"X",\u1e8c:"X","\u24ce":"Y",\uff39:"Y",\u1ef2:"Y",\u00dd:"Y",\u0176:"Y",\u1ef8:"Y",\u0232:"Y",\u1e8e:"Y",\u0178:"Y",\u1ef6:"Y",\u1ef4:"Y",\u01b3:"Y",\u024e:"Y",\u1efe:"Y","\u24cf":"Z",\uff3a:"Z",\u0179:"Z",\u1e90:"Z",\u017b:"Z",\u017d:"Z",\u1e92:"Z",\u1e94:"Z",\u01b5:"Z",\u0224:"Z",\u2c7f:"Z",\u2c6b:"Z",\ua762:"Z","\u24d0":"a",\uff41:"a",\u1e9a:"a",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u1ea7:"a",\u1ea5:"a",\u1eab:"a",\u1ea9:"a",\u00e3:"a",\u0101:"a",\u0103:"a",\u1eb1:"a",\u1eaf:"a",\u1eb5:"a",\u1eb3:"a",\u0227:"a",\u01e1:"a",\u00e4:"a",\u01df:"a",\u1ea3:"a",\u00e5:"a",\u01fb:"a",\u01ce:"a",\u0201:"a",\u0203:"a",\u1ea1:"a",\u1ead:"a",\u1eb7:"a",\u1e01:"a",\u0105:"a",\u2c65:"a",\u0250:"a",\ua733:"aa",\u00e6:"ae",\u01fd:"ae",\u01e3:"ae",\ua735:"ao",\ua737:"au",\ua739:"av",\ua73b:"av",\ua73d:"ay","\u24d1":"b",\uff42:"b",\u1e03:"b",\u1e05:"b",\u1e07:"b",\u0180:"b",\u0183:"b",\u0253:"b","\u24d2":"c",\uff43:"c",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u00e7:"c",\u1e09:"c",\u0188:"c",\u023c:"c",\ua73f:"c",\u2184:"c","\u24d3":"d",\uff44:"d",\u1e0b:"d",\u010f:"d",\u1e0d:"d",\u1e11:"d",\u1e13:"d",\u1e0f:"d",\u0111:"d",\u018c:"d",\u0256:"d",\u0257:"d",\ua77a:"d",\u01f3:"dz",\u01c6:"dz","\u24d4":"e",\uff45:"e",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u1ec1:"e",\u1ebf:"e",\u1ec5:"e",\u1ec3:"e",\u1ebd:"e",\u0113:"e",\u1e15:"e",\u1e17:"e",\u0115:"e",\u0117:"e",\u00eb:"e",\u1ebb:"e",\u011b:"e",\u0205:"e",\u0207:"e",\u1eb9:"e",\u1ec7:"e",\u0229:"e",\u1e1d:"e",\u0119:"e",\u1e19:"e",\u1e1b:"e",\u0247:"e",\u025b:"e",\u01dd:"e","\u24d5":"f",\uff46:"f",\u1e1f:"f",\u0192:"f",\ua77c:"f","\u24d6":"g",\uff47:"g",\u01f5:"g",\u011d:"g",\u1e21:"g",\u011f:"g",\u0121:"g",\u01e7:"g",\u0123:"g",\u01e5:"g",\u0260:"g",\ua7a1:"g",\u1d79:"g",\ua77f:"g","\u24d7":"h",\uff48:"h",\u0125:"h",\u1e23:"h",\u1e27:"h",\u021f:"h",\u1e25:"h",\u1e29:"h",\u1e2b:"h",\u1e96:"h",\u0127:"h",\u2c68:"h",\u2c76:"h",\u0265:"h",\u0195:"hv","\u24d8":"i",\uff49:"i",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u0129:"i",\u012b:"i",\u012d:"i",\u00ef:"i",\u1e2f:"i",\u1ec9:"i",\u01d0:"i",\u0209:"i",\u020b:"i",\u1ecb:"i",\u012f:"i",\u1e2d:"i",\u0268:"i",\u0131:"i","\u24d9":"j",\uff4a:"j",\u0135:"j",\u01f0:"j",\u0249:"j","\u24da":"k",\uff4b:"k",\u1e31:"k",\u01e9:"k",\u1e33:"k",\u0137:"k",\u1e35:"k",\u0199:"k",\u2c6a:"k",\ua741:"k",\ua743:"k",\ua745:"k",\ua7a3:"k","\u24db":"l",\uff4c:"l",\u0140:"l",\u013a:"l",\u013e:"l",\u1e37:"l",\u1e39:"l",\u013c:"l",\u1e3d:"l",\u1e3b:"l",\u017f:"l",\u0142:"l",\u019a:"l",\u026b:"l",\u2c61:"l",\ua749:"l",\ua781:"l",\ua747:"l",\u01c9:"lj","\u24dc":"m",\uff4d:"m",\u1e3f:"m",\u1e41:"m",\u1e43:"m",\u0271:"m",\u026f:"m","\u24dd":"n",\uff4e:"n",\u01f9:"n",\u0144:"n",\u00f1:"n",\u1e45:"n",\u0148:"n",\u1e47:"n",\u0146:"n",\u1e4b:"n",\u1e49:"n",\u019e:"n",\u0272:"n",\u0149:"n",\ua791:"n",\ua7a5:"n",\u01cc:"nj","\u24de":"o",\uff4f:"o",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u1ed3:"o",\u1ed1:"o",\u1ed7:"o",\u1ed5:"o",\u00f5:"o",\u1e4d:"o",\u022d:"o",\u1e4f:"o",\u014d:"o",\u1e51:"o",\u1e53:"o",\u014f:"o",\u022f:"o",\u0231:"o",\u00f6:"o",\u022b:"o",\u1ecf:"o",\u0151:"o",\u01d2:"o",\u020d:"o",\u020f:"o",\u01a1:"o",\u1edd:"o",\u1edb:"o",\u1ee1:"o",\u1edf:"o",\u1ee3:"o",\u1ecd:"o",\u1ed9:"o",\u01eb:"o",\u01ed:"o",\u00f8:"o",\u01ff:"o",\u0254:"o",\ua74b:"o",\ua74d:"o",\u0275:"o",\u01a3:"oi",\u0223:"ou",\ua74f:"oo","\u24df":"p",\uff50:"p",\u1e55:"p",\u1e57:"p",\u01a5:"p",\u1d7d:"p",\ua751:"p",\ua753:"p",\ua755:"p","\u24e0":"q",\uff51:"q",\u024b:"q",\ua757:"q",\ua759:"q","\u24e1":"r",\uff52:"r",\u0155:"r",\u1e59:"r",\u0159:"r",\u0211:"r",\u0213:"r",\u1e5b:"r",\u1e5d:"r",\u0157:"r",\u1e5f:"r",\u024d:"r",\u027d:"r",\ua75b:"r",\ua7a7:"r",\ua783:"r","\u24e2":"s",\uff53:"s",\u00df:"s",\u015b:"s",\u1e65:"s",\u015d:"s",\u1e61:"s",\u0161:"s",\u1e67:"s",\u1e63:"s",\u1e69:"s",\u0219:"s",\u015f:"s",\u023f:"s",\ua7a9:"s",\ua785:"s",\u1e9b:"s","\u24e3":"t",\uff54:"t",\u1e6b:"t",\u1e97:"t",\u0165:"t",\u1e6d:"t",\u021b:"t",\u0163:"t",\u1e71:"t",\u1e6f:"t",\u0167:"t",\u01ad:"t",\u0288:"t",\u2c66:"t",\ua787:"t",\ua729:"tz","\u24e4":"u",\uff55:"u",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u0169:"u",\u1e79:"u",\u016b:"u",\u1e7b:"u",\u016d:"u",\u00fc:"u",\u01dc:"u",\u01d8:"u",\u01d6:"u",\u01da:"u",\u1ee7:"u",\u016f:"u",\u0171:"u",\u01d4:"u",\u0215:"u",\u0217:"u",\u01b0:"u",\u1eeb:"u",\u1ee9:"u",\u1eef:"u",\u1eed:"u",\u1ef1:"u",\u1ee5:"u",\u1e73:"u",\u0173:"u",\u1e77:"u",\u1e75:"u",\u0289:"u","\u24e5":"v",\uff56:"v",\u1e7d:"v",\u1e7f:"v",\u028b:"v",\ua75f:"v",\u028c:"v",\ua761:"vy","\u24e6":"w",\uff57:"w",\u1e81:"w",\u1e83:"w",\u0175:"w",\u1e87:"w",\u1e85:"w",\u1e98:"w",\u1e89:"w",\u2c73:"w","\u24e7":"x",\uff58:"x",\u1e8b:"x",\u1e8d:"x","\u24e8":"y",\uff59:"y",\u1ef3:"y",\u00fd:"y",\u0177:"y",\u1ef9:"y",\u0233:"y",\u1e8f:"y",\u00ff:"y",\u1ef7:"y",\u1e99:"y",\u1ef5:"y",\u01b4:"y",\u024f:"y",\u1eff:"y","\u24e9":"z",\uff5a:"z",\u017a:"z",\u1e91:"z",\u017c:"z",\u017e:"z",\u1e93:"z",\u1e95:"z",\u01b6:"z",\u0225:"z",\u0240:"z",\u2c6c:"z",\ua763:"z",\u0386:"\u0391",\u0388:"\u0395",\u0389:"\u0397",\u038a:"\u0399",\u03aa:"\u0399",\u038c:"\u039f",\u038e:"\u03a5",\u03ab:"\u03a5",\u038f:"\u03a9",\u03ac:"\u03b1",\u03ad:"\u03b5",\u03ae:"\u03b7",\u03af:"\u03b9",\u03ca:"\u03b9",\u0390:"\u03b9",\u03cc:"\u03bf",\u03cd:"\u03c5",\u03cb:"\u03c5",\u03b0:"\u03c5",\u03c9:"\u03c9",\u03c2:"\u03c3"};function $(l){return l.replace(/[^\u0000-\u007E]/g,i=>X[i]||i)}class J{constructor(a,i){this._ngSelect=a,this._selectionModel=i,this._items=[],this._filteredItems=[],this._markedIndex=-1}get items(){return this._items}get filteredItems(){return this._filteredItems}get markedIndex(){return this._markedIndex}get selectedItems(){return this._selectionModel.value}get markedItem(){return this._filteredItems[this._markedIndex]}get noItemsToSelect(){return this._ngSelect.hideSelected&&this._items.length===this.selectedItems.length}get maxItemsSelected(){return this._ngSelect.multiple&&this._ngSelect.maxSelectedItems<=this.selectedItems.length}get lastSelectedItem(){let a=this.selectedItems.length-1;for(;a>=0;a--){const i=this.selectedItems[a];if(!i.disabled)return i}return null}setItems(a){this._items=a.map((i,o)=>this.mapItem(i,o)),this._ngSelect.groupBy?(this._groups=this._groupBy(this._items,this._ngSelect.groupBy),this._items=this._flatten(this._groups)):(this._groups=new Map,this._groups.set(void 0,this._items)),this._filteredItems=[...this._items]}select(a){if(a.selected||this.maxItemsSelected)return;const i=this._ngSelect.multiple;i||this.clearSelected(),this._selectionModel.select(a,i,this._ngSelect.selectableGroupAsModel),this._ngSelect.hideSelected&&this._hideSelected(a)}unselect(a){a.selected&&(this._selectionModel.unselect(a,this._ngSelect.multiple),this._ngSelect.hideSelected&&F(a.index)&&this._ngSelect.multiple&&this._showSelected(a))}findItem(a){let i;return i=this._ngSelect.compareWith?o=>this._ngSelect.compareWith(o.value,a):this._ngSelect.bindValue?o=>!o.children&&this.resolveNested(o.value,this._ngSelect.bindValue)===a:o=>o.value===a||!o.children&&o.label&&o.label===this.resolveNested(a,this._ngSelect.bindLabel),this._items.find(o=>i(o))}addItem(a){const i=this.mapItem(a,this._items.length);return this._items.push(i),this._filteredItems.push(i),i}clearSelected(a=!1){this._selectionModel.clear(a),this._items.forEach(i=>{i.selected=a&&i.selected&&i.disabled,i.marked=!1}),this._ngSelect.hideSelected&&this.resetFilteredItems()}findByLabel(a){return a=$(a).toLocaleLowerCase(),this.filteredItems.find(i=>$(i.label).toLocaleLowerCase().substr(0,a.length)===a)}filter(a){if(!a)return void this.resetFilteredItems();this._filteredItems=[],a=this._ngSelect.searchFn?a:$(a).toLocaleLowerCase();const i=this._ngSelect.searchFn||this._defaultSearchFn,o=this._ngSelect.hideSelected;for(const u of Array.from(this._groups.keys())){const d=[];for(const h of this._groups.get(u))o&&(h.parent&&h.parent.selected||h.selected)||i(a,this._ngSelect.searchFn?h.value:h)&&d.push(h);if(d.length>0){const[h]=d.slice(-1);if(h.parent){const b=this._items.find(O=>O===h.parent);this._filteredItems.push(b)}this._filteredItems.push(...d)}}}resetFilteredItems(){this._filteredItems.length!==this._items.length&&(this._filteredItems=this._ngSelect.hideSelected&&this.selectedItems.length>0?this._items.filter(a=>!a.selected):this._items)}unmarkItem(){this._markedIndex=-1}markNextItem(){this._stepToItem(1)}markPreviousItem(){this._stepToItem(-1)}markItem(a){this._markedIndex=this._filteredItems.indexOf(a)}markSelectedOrDefault(a){if(0===this._filteredItems.length)return;const i=this._getLastMarkedIndex();this._markedIndex=i>-1?i:a?this.filteredItems.findIndex(o=>!o.disabled):-1}resolveNested(a,i){if(!Q(a))return a;if(-1===i.indexOf("."))return a[i];{const o=i.split(".");let u=a;for(let d=0,h=o.length;d<h;++d){if(null==u)return null;u=u[o[d]]}return u}}mapItem(a,i){const o=F(a.$ngOptionLabel)?a.$ngOptionLabel:this.resolveNested(a,this._ngSelect.bindLabel),u=F(a.$ngOptionValue)?a.$ngOptionValue:a;return{index:i,label:F(o)?o.toString():"",value:u,disabled:a.disabled,htmlId:`${this._ngSelect.dropdownId}-${i}`}}mapSelectedItems(){const a=this._ngSelect.multiple;for(const i of this.selectedItems){const o=this._ngSelect.bindValue?this.resolveNested(i.value,this._ngSelect.bindValue):i.value,u=F(o)?this.findItem(o):null;this._selectionModel.unselect(i,a),this._selectionModel.select(u||i,a,this._ngSelect.selectableGroupAsModel)}this._ngSelect.hideSelected&&(this._filteredItems=this.filteredItems.filter(i=>-1===this.selectedItems.indexOf(i)))}_showSelected(a){if(this._filteredItems.push(a),a.parent){const i=a.parent;this._filteredItems.find(u=>u===i)||this._filteredItems.push(i)}else if(a.children)for(const i of a.children)i.selected=!1,this._filteredItems.push(i);this._filteredItems=[...this._filteredItems.sort((i,o)=>i.index-o.index)]}_hideSelected(a){this._filteredItems=this._filteredItems.filter(i=>i!==a),a.parent?a.parent.children.every(o=>o.selected)&&(this._filteredItems=this._filteredItems.filter(o=>o!==a.parent)):a.children&&(this._filteredItems=this.filteredItems.filter(i=>i.parent!==a))}_defaultSearchFn(a,i){return $(i.label).toLocaleLowerCase().indexOf(a)>-1}_getNextItemIndex(a){return a>0?this._markedIndex>=this._filteredItems.length-1?0:this._markedIndex+1:this._markedIndex<=0?this._filteredItems.length-1:this._markedIndex-1}_stepToItem(a){0===this._filteredItems.length||this._filteredItems.every(i=>i.disabled)||(this._markedIndex=this._getNextItemIndex(a),this.markedItem.disabled&&this._stepToItem(a))}_getLastMarkedIndex(){if(this._ngSelect.hideSelected||this._markedIndex>-1&&void 0===this.markedItem)return-1;const a=this._filteredItems.indexOf(this.lastSelectedItem);return this.lastSelectedItem&&a<0?-1:Math.max(this.markedIndex,a)}_groupBy(a,i){const o=new Map;if(0===a.length)return o;if(Array.isArray(a[0].value[i])){for(const h of a){const b=(h.value[i]||[]).map((O,w)=>this.mapItem(O,w));o.set(h,b)}return o}const u=re(this._ngSelect.groupBy),d=h=>{const b=u?i(h.value):h.value[i];return F(b)?b:void 0};for(const h of a){const b=d(h),O=o.get(b);O?O.push(h):o.set(b,[h])}return o}_flatten(a){const i=re(this._ngSelect.groupBy),o=[];for(const u of Array.from(a.keys())){let d=o.length;if(void 0===u){const R=a.get(void 0)||[];o.push(...R.map(G=>(G.index=d++,G)));continue}const h=Q(u),b={label:h?"":String(u),children:void 0,parent:null,index:d++,disabled:!this._ngSelect.selectableGroup,htmlId:oe()},O=i?this._ngSelect.bindLabel:this._ngSelect.groupBy,w=this._ngSelect.groupValue||(()=>h?u.value:{[O]:u}),W=a.get(u).map(R=>(R.parent=b,R.children=void 0,R.index=d++,R));b.children=W,b.value=w(u,W.map(R=>R.value)),o.push(b),o.push(...W)}return o}}var k=(()=>{return(l=k||(k={}))[l.Tab=9]="Tab",l[l.Enter=13]="Enter",l[l.Esc=27]="Esc",l[l.Space=32]="Space",l[l.ArrowUp=38]="ArrowUp",l[l.ArrowDown=40]="ArrowDown",l[l.Backspace=8]="Backspace",k;var l})();let le=(()=>{class l{constructor(){this._dimensions={itemHeight:0,panelHeight:0,itemsPerViewport:0}}get dimensions(){return this._dimensions}calculateItems(i,o,u){const d=this._dimensions,h=d.itemHeight*o,O=Math.max(0,i)/h*o;let w=Math.min(o,Math.ceil(O)+(d.itemsPerViewport+1));const R=Math.max(0,w-d.itemsPerViewport);let G=Math.min(R,Math.floor(O)),ae=d.itemHeight*Math.ceil(G)-d.itemHeight*Math.min(G,u);return ae=isNaN(ae)?0:ae,G=isNaN(G)?-1:G,w=isNaN(w)?-1:w,G-=u,G=Math.max(0,G),w+=u,w=Math.min(o,w),{topPadding:ae,scrollHeight:h,start:G,end:w}}setDimensions(i,o){const u=Math.max(1,Math.floor(o/i));this._dimensions={itemHeight:i,panelHeight:o,itemsPerViewport:u}}getScrollTo(i,o,u){const{panelHeight:d}=this.dimensions,h=i+o,O=u+d;return d>=h&&u===i?null:h>O?u+h-O:i<=u?i:null}}return l.\u0275fac=function(i){return new(i||l)},l.\u0275prov=e.Yz7({token:l,factory:l.\u0275fac}),l})();const He=["top","right","bottom","left"],me=typeof requestAnimationFrame<"u"?p.Z:A.E;let Ue=(()=>{class l{constructor(i,o,u,d,h){this._renderer=i,this._zone=o,this._panelService=u,this._document=h,this.items=[],this.position="auto",this.virtualScroll=!1,this.filterValue=null,this.update=new e.vpe,this.scroll=new e.vpe,this.scrollToEnd=new e.vpe,this.outsideClick=new e.vpe,this._destroy$=new C.x,this._scrollToEndFired=!1,this._updateScrollHeight=!1,this._lastScrollPosition=0,this._dropdown=d.nativeElement}get currentPosition(){return this._currentPosition}get itemsLength(){return this._itemsLength}set itemsLength(i){i!==this._itemsLength&&(this._itemsLength=i,this._onItemsLengthChanged())}get _startOffset(){if(this.markedItem){const{itemHeight:i,panelHeight:o}=this._panelService.dimensions,u=this.markedItem.index*i;return o>u?0:u}return 0}ngOnInit(){this._select=this._dropdown.parentElement,this._virtualPadding=this.paddingElementRef.nativeElement,this._scrollablePanel=this.scrollElementRef.nativeElement,this._contentPanel=this.contentElementRef.nativeElement,this._handleScroll(),this._handleOutsideClick(),this._appendDropdown(),this._setupMousedownListener()}ngOnChanges(i){if(i.items){const o=i.items;this._onItemsChange(o.currentValue,o.firstChange)}}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete(),this._destroy$.unsubscribe(),this.appendTo&&this._renderer.removeChild(this._dropdown.parentNode,this._dropdown)}scrollTo(i,o=!1){if(!i)return;const u=this.items.indexOf(i);if(u<0||u>=this.itemsLength)return;let d;if(this.virtualScroll){const h=this._panelService.dimensions.itemHeight;d=this._panelService.getScrollTo(u*h,h,this._lastScrollPosition)}else{const h=this._dropdown.querySelector(`#${i.htmlId}`);d=this._panelService.getScrollTo(h.offsetTop,h.clientHeight,o?h.offsetTop:this._lastScrollPosition)}F(d)&&(this._scrollablePanel.scrollTop=d)}scrollToTag(){const i=this._scrollablePanel;i.scrollTop=i.scrollHeight-i.clientHeight}adjustPosition(){this._updateYPosition()}_handleDropdownPosition(){this._currentPosition=this._calculateCurrentPosition(this._dropdown),He.includes(this._currentPosition)?this._updateDropdownClass(this._currentPosition):this._updateDropdownClass("bottom"),this.appendTo&&this._updateYPosition(),this._dropdown.style.opacity="1"}_updateDropdownClass(i){He.forEach(u=>{const d=`ng-select-${u}`;this._renderer.removeClass(this._dropdown,d),this._renderer.removeClass(this._select,d)});const o=`ng-select-${i}`;this._renderer.addClass(this._dropdown,o),this._renderer.addClass(this._select,o)}_handleScroll(){this._zone.runOutsideAngular(()=>{(0,D.R)(this.scrollElementRef.nativeElement,"scroll").pipe((0,T.R)(this._destroy$),(0,P.e)(0,me)).subscribe(i=>{const o=i.path||i.composedPath&&i.composedPath();this._onContentScrolled(o&&0!==o.length?o[0].scrollTop:i.target.scrollTop)})})}_handleOutsideClick(){this._document&&this._zone.runOutsideAngular(()=>{(0,x.T)((0,D.R)(this._document,"touchstart",{capture:!0}),(0,D.R)(this._document,"mousedown",{capture:!0})).pipe((0,T.R)(this._destroy$)).subscribe(i=>this._checkToClose(i))})}_checkToClose(i){if(this._select.contains(i.target)||this._dropdown.contains(i.target))return;const o=i.path||i.composedPath&&i.composedPath();i.target&&i.target.shadowRoot&&o&&o[0]&&this._select.contains(o[0])||this._zone.run(()=>this.outsideClick.emit())}_onItemsChange(i,o){this.items=i||[],this._scrollToEndFired=!1,this.itemsLength=i.length,this.virtualScroll?this._updateItemsRange(o):(this._setVirtualHeight(),this._updateItems(o))}_updateItems(i){this.update.emit(this.items),!1!==i&&this._zone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._panelService.setDimensions(0,this._scrollablePanel.clientHeight),this._handleDropdownPosition(),this.scrollTo(this.markedItem,i)})})}_updateItemsRange(i){this._zone.runOutsideAngular(()=>{this._measureDimensions().then(()=>{i?(this._renderItemsRange(this._startOffset),this._handleDropdownPosition()):this._renderItemsRange()})})}_onContentScrolled(i){this.virtualScroll&&this._renderItemsRange(i),this._lastScrollPosition=i,this._fireScrollToEnd(i)}_updateVirtualHeight(i){this._updateScrollHeight&&(this._virtualPadding.style.height=`${i}px`,this._updateScrollHeight=!1)}_setVirtualHeight(){this._virtualPadding&&(this._virtualPadding.style.height="0px")}_onItemsLengthChanged(){this._updateScrollHeight=!0}_renderItemsRange(i=null){if(i&&this._lastScrollPosition===i)return;const o=this._panelService.calculateItems(i=i||this._scrollablePanel.scrollTop,this.itemsLength,this.bufferAmount);this._updateVirtualHeight(o.scrollHeight),this._contentPanel.style.transform=`translateY(${o.topPadding}px)`,this._zone.run(()=>{this.update.emit(this.items.slice(o.start,o.end)),this.scroll.emit({start:o.start,end:o.end})}),F(i)&&0===this._lastScrollPosition&&(this._scrollablePanel.scrollTop=i,this._lastScrollPosition=i)}_measureDimensions(){if(this._panelService.dimensions.itemHeight>0||0===this.itemsLength)return Promise.resolve(this._panelService.dimensions);const[i]=this.items;return this.update.emit([i]),Promise.resolve().then(()=>{const u=this._dropdown.querySelector(`#${i.htmlId}`).clientHeight;return this._virtualPadding.style.height=u*this.itemsLength+"px",this._panelService.setDimensions(u,this._scrollablePanel.clientHeight),this._panelService.dimensions})}_fireScrollToEnd(i){this._scrollToEndFired||0===i||i+this._dropdown.clientHeight>=(this.virtualScroll?this._virtualPadding:this._contentPanel).clientHeight-1&&(this._zone.run(()=>this.scrollToEnd.emit()),this._scrollToEndFired=!0)}_calculateCurrentPosition(i){if("auto"!==this.position)return this.position;const o=this._select.getBoundingClientRect(),u=document.documentElement.scrollTop||document.body.scrollTop;return o.top+window.pageYOffset+o.height+i.getBoundingClientRect().height>u+document.documentElement.clientHeight?"top":"bottom"}_appendDropdown(){if(this.appendTo){if(this._parent=document.querySelector(this.appendTo),!this._parent)throw new Error(`appendTo selector ${this.appendTo} did not found any parent element`);this._updateXPosition(),this._parent.appendChild(this._dropdown)}}_updateXPosition(){const i=this._select.getBoundingClientRect(),o=this._parent.getBoundingClientRect();this._dropdown.style.left=i.left-o.left+"px",this._dropdown.style.width=i.width+"px",this._dropdown.style.minWidth=i.width+"px"}_updateYPosition(){const i=this._select.getBoundingClientRect(),o=this._parent.getBoundingClientRect(),u=i.height;"top"===this._currentPosition?(this._dropdown.style.bottom=o.bottom-i.bottom+u+"px",this._dropdown.style.top="auto"):"bottom"===this._currentPosition&&(this._dropdown.style.top=i.top-o.top+u+"px",this._dropdown.style.bottom="auto")}_setupMousedownListener(){this._zone.runOutsideAngular(()=>{(0,D.R)(this._dropdown,"mousedown").pipe((0,T.R)(this._destroy$)).subscribe(i=>{"INPUT"!==i.target.tagName&&i.preventDefault()})})}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Qsj),e.Y36(e.R0b),e.Y36(le),e.Y36(e.SBq),e.Y36(v.K0,8))},l.\u0275cmp=e.Xpm({type:l,selectors:[["ng-dropdown-panel"]],viewQuery:function(i,o){if(1&i&&(e.Gf(y,7,e.SBq),e.Gf(m,7,e.SBq),e.Gf(_,7,e.SBq)),2&i){let u;e.iGM(u=e.CRH())&&(o.contentElementRef=u.first),e.iGM(u=e.CRH())&&(o.scrollElementRef=u.first),e.iGM(u=e.CRH())&&(o.paddingElementRef=u.first)}},inputs:{items:"items",markedItem:"markedItem",position:"position",appendTo:"appendTo",bufferAmount:"bufferAmount",virtualScroll:"virtualScroll",headerTemplate:"headerTemplate",footerTemplate:"footerTemplate",filterValue:"filterValue"},outputs:{update:"update",scroll:"scroll",scrollToEnd:"scrollToEnd",outsideClick:"outsideClick"},features:[e.TTD],ngContentSelectors:q,decls:9,vars:6,consts:[["class","ng-dropdown-header",4,"ngIf"],[1,"ng-dropdown-panel-items","scroll-host"],["scroll",""],["padding",""],["content",""],["class","ng-dropdown-footer",4,"ngIf"],[1,"ng-dropdown-header"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ng-dropdown-footer"]],template:function(i,o){1&i&&(e.F$t(),e.YNc(0,Y,2,4,"div",0),e.TgZ(1,"div",1,2),e._UZ(3,"div",null,3),e.TgZ(5,"div",null,4),e.Hsn(7),e.qZA()(),e.YNc(8,z,2,4,"div",5)),2&i&&(e.Q6J("ngIf",o.headerTemplate),e.xp6(3),e.ekj("total-padding",o.virtualScroll),e.xp6(2),e.ekj("scrollable-content",o.virtualScroll&&o.items.length),e.xp6(3),e.Q6J("ngIf",o.footerTemplate))},dependencies:[v.O5,v.tP],encapsulation:2,changeDetection:0}),l})(),ee=(()=>{class l{constructor(i){this.elementRef=i,this.stateChange$=new C.x,this._disabled=!1}get disabled(){return this._disabled}set disabled(i){this._disabled=this._isDisabled(i)}get label(){return(this.elementRef.nativeElement.textContent||"").trim()}ngOnChanges(i){i.disabled&&this.stateChange$.next({value:this.value,disabled:this._disabled})}ngAfterViewChecked(){this.label!==this._previousLabel&&(this._previousLabel=this.label,this.stateChange$.next({value:this.value,disabled:this._disabled,label:this.elementRef.nativeElement.innerHTML}))}ngOnDestroy(){this.stateChange$.complete()}_isDisabled(i){return null!=i&&"false"!=`${i}`}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.SBq))},l.\u0275cmp=e.Xpm({type:l,selectors:[["ng-option"]],inputs:{value:"value",disabled:"disabled"},features:[e.TTD],ngContentSelectors:q,decls:1,vars:0,template:function(i,o){1&i&&(e.F$t(),e.Hsn(0))},encapsulation:2,changeDetection:0}),l})(),Ye=(()=>{class l{constructor(){this.notFoundText="No items found",this.typeToSearchText="Type to search",this.addTagText="Add item",this.loadingText="Loading...",this.clearAllText="Clear all",this.disableVirtualScroll=!0,this.openOnEnter=!0,this.appearance="underline"}}return l.\u0275fac=function(i){return new(i||l)},l.\u0275prov=e.Yz7({token:l,factory:l.\u0275fac,providedIn:"root"}),l})(),je=(()=>{class l{warn(i){console.warn(i)}}return l.\u0275fac=function(i){return new(i||l)},l.\u0275prov=e.Yz7({token:l,factory:l.\u0275fac,providedIn:"root"}),l})();const ge=new e.OlP("ng-select-selection-model");let fe=(()=>{class l{constructor(i,o,u,d,h,b,O){this.classes=i,this.autoFocus=o,this.config=u,this._cd=b,this._console=O,this.markFirst=!0,this.dropdownPosition="auto",this.loading=!1,this.closeOnSelect=!0,this.hideSelected=!1,this.selectOnTab=!1,this.bufferAmount=4,this.selectableGroup=!1,this.selectableGroupAsModel=!0,this.searchFn=null,this.trackByFn=null,this.clearOnBackspace=!0,this.labelForId=null,this.inputAttrs={},this.readonly=!1,this.searchWhileComposing=!0,this.minTermLength=0,this.editableSearchTerm=!1,this.keyDownFn=w=>!0,this.multiple=!1,this.addTag=!1,this.searchable=!0,this.clearable=!0,this.isOpen=!1,this.blurEvent=new e.vpe,this.focusEvent=new e.vpe,this.changeEvent=new e.vpe,this.openEvent=new e.vpe,this.closeEvent=new e.vpe,this.searchEvent=new e.vpe,this.clearEvent=new e.vpe,this.addEvent=new e.vpe,this.removeEvent=new e.vpe,this.scroll=new e.vpe,this.scrollToEnd=new e.vpe,this.useDefaultClass=!0,this.viewPortItems=[],this.searchTerm=null,this.dropdownId=oe(),this.escapeHTML=!0,this._items=[],this._defaultLabel="label",this._pressedKeys=[],this._isComposing=!1,this._destroy$=new C.x,this._keyPress$=new C.x,this._onChange=w=>{},this._onTouched=()=>{},this.clearItem=w=>{const W=this.selectedItems.find(R=>R.value===w);this.unselect(W)},this.trackByOption=(w,W)=>this.trackByFn?this.trackByFn(W.value):W,this._mergeGlobalConfig(u),this.itemsList=new J(this,d()),this.element=h.nativeElement}get items(){return this._items}set items(i){null===i&&(i=[]),this._itemsAreUsed=!0,this._items=i}get compareWith(){return this._compareWith}set compareWith(i){if(null!=i&&!re(i))throw Error("`compareWith` must be a function.");this._compareWith=i}get clearSearchOnAdd(){return F(this._clearSearchOnAdd)?this._clearSearchOnAdd:F(this.config.clearSearchOnAdd)?this.config.clearSearchOnAdd:this.closeOnSelect}set clearSearchOnAdd(i){this._clearSearchOnAdd=i}get disabled(){return this.readonly||this._disabled}get filtered(){return!!this.searchTerm&&this.searchable||this._isComposing}get single(){return!this.multiple}get _editableSearchTerm(){return this.editableSearchTerm&&!this.multiple}get selectedItems(){return this.itemsList.selectedItems}get selectedValues(){return this.selectedItems.map(i=>i.value)}get hasValue(){return this.selectedItems.length>0}get currentPanelPosition(){if(this.dropdownPanel)return this.dropdownPanel.currentPosition}ngOnInit(){this._handleKeyPresses(),this._setInputAttributes()}ngOnChanges(i){i.multiple&&this.itemsList.clearSelected(),i.items&&this._setItems(i.items.currentValue||[]),i.isOpen&&(this._manualOpen=F(i.isOpen.currentValue))}ngAfterViewInit(){this._itemsAreUsed||(this.escapeHTML=!1,this._setItemsFromNgOptions()),F(this.autoFocus)&&this.focus()}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete()}handleKeyDown(i){if(k[i.which]){if(!1===this.keyDownFn(i))return;this.handleKeyCode(i)}else i.key&&1===i.key.length&&this._keyPress$.next(i.key.toLocaleLowerCase())}handleKeyCode(i){switch(i.which){case k.ArrowDown:this._handleArrowDown(i);break;case k.ArrowUp:this._handleArrowUp(i);break;case k.Space:this._handleSpace(i);break;case k.Enter:this._handleEnter(i);break;case k.Tab:this._handleTab(i);break;case k.Esc:this.close(),i.preventDefault();break;case k.Backspace:this._handleBackspace()}}handleMousedown(i){const o=i.target;"INPUT"!==o.tagName&&i.preventDefault(),o.classList.contains("ng-clear-wrapper")?this.handleClearClick():o.classList.contains("ng-arrow-wrapper")?this.handleArrowClick():o.classList.contains("ng-value-icon")||(this.focused||this.focus(),this.searchable?this.open():this.toggle())}handleArrowClick(){this.isOpen?this.close():this.open()}handleClearClick(){this.hasValue&&(this.itemsList.clearSelected(!0),this._updateNgModel()),this._clearSearch(),this.focus(),this.clearEvent.emit(),this._onSelectionChanged()}clearModel(){this.clearable&&(this.itemsList.clearSelected(),this._updateNgModel())}writeValue(i){this.itemsList.clearSelected(),this._handleWriteValue(i),this._cd.markForCheck()}registerOnChange(i){this._onChange=i}registerOnTouched(i){this._onTouched=i}setDisabledState(i){this._disabled=i,this._cd.markForCheck()}toggle(){this.isOpen?this.close():this.open()}open(){this.disabled||this.isOpen||this._manualOpen||!this._isTypeahead&&!this.addTag&&this.itemsList.noItemsToSelect||(this.isOpen=!0,this.itemsList.markSelectedOrDefault(this.markFirst),this.openEvent.emit(),this.searchTerm||this.focus(),this.detectChanges())}close(){!this.isOpen||this._manualOpen||(this.isOpen=!1,this._isComposing=!1,this._editableSearchTerm?this.itemsList.resetFilteredItems():this._clearSearch(),this.itemsList.unmarkItem(),this._onTouched(),this.closeEvent.emit(),this._cd.markForCheck())}toggleItem(i){!i||i.disabled||this.disabled||(this.multiple&&i.selected?this.unselect(i):this.select(i),this._editableSearchTerm&&this._setSearchTermFromItems(),this._onSelectionChanged())}select(i){i.selected||(this.itemsList.select(i),this.clearSearchOnAdd&&!this._editableSearchTerm&&this._clearSearch(),this._updateNgModel(),this.multiple&&this.addEvent.emit(i.value)),(this.closeOnSelect||this.itemsList.noItemsToSelect)&&this.close()}focus(){this.searchInput.nativeElement.focus()}blur(){this.searchInput.nativeElement.blur()}unselect(i){i&&(this.itemsList.unselect(i),this.focus(),this._updateNgModel(),this.removeEvent.emit(i))}selectTag(){let i;i=re(this.addTag)?this.addTag(this.searchTerm):this._primitive?this.searchTerm:{[this.bindLabel]:this.searchTerm};const o=u=>this._isTypeahead||!this.isOpen?this.itemsList.mapItem(u,null):this.itemsList.addItem(u);!function pe(l){return l instanceof Promise}(i)?i&&this.select(o(i)):i.then(u=>this.select(o(u))).catch(()=>{})}showClear(){return this.clearable&&(this.hasValue||this.searchTerm)&&!this.disabled}get showAddTag(){if(!this._validTerm)return!1;const i=this.searchTerm.toLowerCase().trim();return this.addTag&&!this.itemsList.filteredItems.some(o=>o.label.toLowerCase()===i)&&(!this.hideSelected&&this.isOpen||!this.selectedItems.some(o=>o.label.toLowerCase()===i))&&!this.loading}showNoItemsFound(){const i=0===this.itemsList.filteredItems.length;return(i&&!this._isTypeahead&&!this.loading||i&&this._isTypeahead&&this._validTerm&&!this.loading)&&!this.showAddTag}showTypeToSearch(){return 0===this.itemsList.filteredItems.length&&this._isTypeahead&&!this._validTerm&&!this.loading}onCompositionStart(){this._isComposing=!0}onCompositionEnd(i){this._isComposing=!1,!this.searchWhileComposing&&this.filter(i)}filter(i){this._isComposing&&!this.searchWhileComposing||(this.searchTerm=i,this._isTypeahead&&(this._validTerm||0===this.minTermLength)&&this.typeahead.next(i),this._isTypeahead||(this.itemsList.filter(this.searchTerm),this.isOpen&&this.itemsList.markSelectedOrDefault(this.markFirst)),this.searchEvent.emit({term:i,items:this.itemsList.filteredItems.map(o=>o.value)}),this.open())}onInputFocus(i){this.focused||(this._editableSearchTerm&&this._setSearchTermFromItems(),this.element.classList.add("ng-select-focused"),this.focusEvent.emit(i),this.focused=!0)}onInputBlur(i){this.element.classList.remove("ng-select-focused"),this.blurEvent.emit(i),!this.isOpen&&!this.disabled&&this._onTouched(),this._editableSearchTerm&&this._setSearchTermFromItems(),this.focused=!1}onItemHover(i){i.disabled||this.itemsList.markItem(i)}detectChanges(){this._cd.destroyed||this._cd.detectChanges()}_setSearchTermFromItems(){const i=this.selectedItems&&this.selectedItems[0];this.searchTerm=i&&i.label||null}_setItems(i){const o=i[0];this.bindLabel=this.bindLabel||this._defaultLabel,this._primitive=F(o)?!Q(o):this._primitive||this.bindLabel===this._defaultLabel,this.itemsList.setItems(i),i.length>0&&this.hasValue&&this.itemsList.mapSelectedItems(),this.isOpen&&F(this.searchTerm)&&!this._isTypeahead&&this.itemsList.filter(this.searchTerm),(this._isTypeahead||this.isOpen)&&this.itemsList.markSelectedOrDefault(this.markFirst)}_setItemsFromNgOptions(){const i=u=>{this.items=u.map(d=>({$ngOptionValue:d.value,$ngOptionLabel:d.elementRef.nativeElement.innerHTML,disabled:d.disabled})),this.itemsList.setItems(this.items),this.hasValue&&this.itemsList.mapSelectedItems(),this.detectChanges()},o=()=>{const u=(0,x.T)(this.ngOptions.changes,this._destroy$);(0,x.T)(...this.ngOptions.map(d=>d.stateChange$)).pipe((0,T.R)(u)).subscribe(d=>{const h=this.itemsList.findItem(d.value);h.disabled=d.disabled,h.label=d.label||h.label,this._cd.detectChanges()})};this.ngOptions.changes.pipe((0,I.O)(this.ngOptions),(0,T.R)(this._destroy$)).subscribe(u=>{this.bindLabel=this._defaultLabel,i(u),o()})}_isValidWriteValue(i){if(!F(i)||this.multiple&&""===i||Array.isArray(i)&&0===i.length)return!1;const o=u=>!(!F(this.compareWith)&&Q(u)&&this.bindValue&&(this._console.warn(`Setting object(${JSON.stringify(u)}) as your model with bindValue is not allowed unless [compareWith] is used.`),1));return this.multiple?Array.isArray(i)?i.every(u=>o(u)):(this._console.warn("Multiple select ngModel should be array."),!1):o(i)}_handleWriteValue(i){if(!this._isValidWriteValue(i))return;const o=u=>{let d=this.itemsList.findItem(u);if(d)this.itemsList.select(d);else{const h=Q(u);h||!h&&!this.bindValue?this.itemsList.select(this.itemsList.mapItem(u,null)):this.bindValue&&(d={[this.bindLabel]:null,[this.bindValue]:u},this.itemsList.select(this.itemsList.mapItem(d,null)))}};this.multiple?i.forEach(u=>o(u)):o(i)}_handleKeyPresses(){this.searchable||this._keyPress$.pipe((0,T.R)(this._destroy$),(0,U.b)(i=>this._pressedKeys.push(i)),(0,L.b)(200),(0,V.h)(()=>this._pressedKeys.length>0),(0,M.U)(()=>this._pressedKeys.join(""))).subscribe(i=>{const o=this.itemsList.findByLabel(i);o&&(this.isOpen?(this.itemsList.markItem(o),this._scrollToMarked(),this._cd.markForCheck()):this.select(o)),this._pressedKeys=[]})}_setInputAttributes(){const i=this.searchInput.nativeElement,o={type:"text",autocorrect:"off",autocapitalize:"off",autocomplete:this.labelForId?"off":this.dropdownId,...this.inputAttrs};for(const u of Object.keys(o))i.setAttribute(u,o[u])}_updateNgModel(){const i=[];for(const u of this.selectedItems)if(this.bindValue){let d=null;d=u.children?u.value[(this.groupValue?this.bindValue:this.groupBy)||this.groupBy]:this.itemsList.resolveNested(u.value,this.bindValue),i.push(d)}else i.push(u.value);const o=this.selectedItems.map(u=>u.value);this.multiple?(this._onChange(i),this.changeEvent.emit(o)):(this._onChange(F(i[0])?i[0]:null),this.changeEvent.emit(o[0])),this._cd.markForCheck()}_clearSearch(){this.searchTerm&&(this._changeSearch(null),this.itemsList.resetFilteredItems())}_changeSearch(i){this.searchTerm=i,this._isTypeahead&&this.typeahead.next(i)}_scrollToMarked(){!this.isOpen||!this.dropdownPanel||this.dropdownPanel.scrollTo(this.itemsList.markedItem)}_scrollToTag(){!this.isOpen||!this.dropdownPanel||this.dropdownPanel.scrollToTag()}_onSelectionChanged(){this.isOpen&&this.multiple&&this.appendTo&&(this._cd.detectChanges(),this.dropdownPanel.adjustPosition())}_handleTab(i){!1===this.isOpen&&!this.addTag||(this.selectOnTab?this.itemsList.markedItem?(this.toggleItem(this.itemsList.markedItem),i.preventDefault()):this.showAddTag?(this.selectTag(),i.preventDefault()):this.close():this.close())}_handleEnter(i){if(this.isOpen||this._manualOpen)this.itemsList.markedItem?this.toggleItem(this.itemsList.markedItem):this.showAddTag&&this.selectTag();else{if(!this.openOnEnter)return;this.open()}i.preventDefault()}_handleSpace(i){this.isOpen||this._manualOpen||(this.open(),i.preventDefault())}_handleArrowDown(i){this._nextItemIsTag(1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markNextItem(),this._scrollToMarked()),this.open(),i.preventDefault()}_handleArrowUp(i){this.isOpen&&(this._nextItemIsTag(-1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markPreviousItem(),this._scrollToMarked()),i.preventDefault())}_nextItemIsTag(i){const o=this.itemsList.markedIndex+i;return this.addTag&&this.searchTerm&&this.itemsList.markedItem&&(o<0||o===this.itemsList.filteredItems.length)}_handleBackspace(){this.searchTerm||!this.clearable||!this.clearOnBackspace||!this.hasValue||(this.multiple?this.unselect(this.itemsList.lastSelectedItem):this.clearModel())}get _isTypeahead(){return this.typeahead&&this.typeahead.observers.length>0}get _validTerm(){const i=this.searchTerm&&this.searchTerm.trim();return i&&i.length>=this.minTermLength}_mergeGlobalConfig(i){this.placeholder=this.placeholder||i.placeholder,this.notFoundText=this.notFoundText||i.notFoundText,this.typeToSearchText=this.typeToSearchText||i.typeToSearchText,this.addTagText=this.addTagText||i.addTagText,this.loadingText=this.loadingText||i.loadingText,this.clearAllText=this.clearAllText||i.clearAllText,this.virtualScroll=F(this.virtualScroll)?this.virtualScroll:!!F(i.disableVirtualScroll)&&!i.disableVirtualScroll,this.openOnEnter=F(this.openOnEnter)?this.openOnEnter:i.openOnEnter,this.appendTo=this.appendTo||i.appendTo,this.bindValue=this.bindValue||i.bindValue,this.bindLabel=this.bindLabel||i.bindLabel,this.appearance=this.appearance||i.appearance}}return l.\u0275fac=function(i){return new(i||l)(e.$8M("class"),e.$8M("autofocus"),e.Y36(Ye),e.Y36(ge),e.Y36(e.SBq),e.Y36(e.sBO),e.Y36(je))},l.\u0275cmp=e.Xpm({type:l,selectors:[["ng-select"]],contentQueries:function(i,o,u){if(1&i&&(e.Suo(u,Qe,5,e.Rgc),e.Suo(u,Ct,5,e.Rgc),e.Suo(u,yt,5,e.Rgc),e.Suo(u,Et,5,e.Rgc),e.Suo(u,At,5,e.Rgc),e.Suo(u,bt,5,e.Rgc),e.Suo(u,Xe,5,e.Rgc),e.Suo(u,Re,5,e.Rgc),e.Suo(u,et,5,e.Rgc),e.Suo(u,tt,5,e.Rgc),e.Suo(u,nt,5,e.Rgc),e.Suo(u,ee,5)),2&i){let d;e.iGM(d=e.CRH())&&(o.optionTemplate=d.first),e.iGM(d=e.CRH())&&(o.optgroupTemplate=d.first),e.iGM(d=e.CRH())&&(o.labelTemplate=d.first),e.iGM(d=e.CRH())&&(o.multiLabelTemplate=d.first),e.iGM(d=e.CRH())&&(o.headerTemplate=d.first),e.iGM(d=e.CRH())&&(o.footerTemplate=d.first),e.iGM(d=e.CRH())&&(o.notFoundTemplate=d.first),e.iGM(d=e.CRH())&&(o.typeToSearchTemplate=d.first),e.iGM(d=e.CRH())&&(o.loadingTextTemplate=d.first),e.iGM(d=e.CRH())&&(o.tagTemplate=d.first),e.iGM(d=e.CRH())&&(o.loadingSpinnerTemplate=d.first),e.iGM(d=e.CRH())&&(o.ngOptions=d)}},viewQuery:function(i,o){if(1&i&&(e.Gf(Ue,5),e.Gf(K,7)),2&i){let u;e.iGM(u=e.CRH())&&(o.dropdownPanel=u.first),e.iGM(u=e.CRH())&&(o.searchInput=u.first)}},hostVars:20,hostBindings:function(i,o){1&i&&e.NdJ("keydown",function(d){return o.handleKeyDown(d)}),2&i&&e.ekj("ng-select-typeahead",o.typeahead)("ng-select-multiple",o.multiple)("ng-select-taggable",o.addTag)("ng-select-searchable",o.searchable)("ng-select-clearable",o.clearable)("ng-select-opened",o.isOpen)("ng-select",o.useDefaultClass)("ng-select-disabled",o.disabled)("ng-select-filtered",o.filtered)("ng-select-single",o.single)},inputs:{bindLabel:"bindLabel",bindValue:"bindValue",markFirst:"markFirst",placeholder:"placeholder",notFoundText:"notFoundText",typeToSearchText:"typeToSearchText",addTagText:"addTagText",loadingText:"loadingText",clearAllText:"clearAllText",appearance:"appearance",dropdownPosition:"dropdownPosition",appendTo:"appendTo",loading:"loading",closeOnSelect:"closeOnSelect",hideSelected:"hideSelected",selectOnTab:"selectOnTab",openOnEnter:"openOnEnter",maxSelectedItems:"maxSelectedItems",groupBy:"groupBy",groupValue:"groupValue",bufferAmount:"bufferAmount",virtualScroll:"virtualScroll",selectableGroup:"selectableGroup",selectableGroupAsModel:"selectableGroupAsModel",searchFn:"searchFn",trackByFn:"trackByFn",clearOnBackspace:"clearOnBackspace",labelForId:"labelForId",inputAttrs:"inputAttrs",tabIndex:"tabIndex",readonly:"readonly",searchWhileComposing:"searchWhileComposing",minTermLength:"minTermLength",editableSearchTerm:"editableSearchTerm",keyDownFn:"keyDownFn",typeahead:"typeahead",multiple:"multiple",addTag:"addTag",searchable:"searchable",clearable:"clearable",isOpen:"isOpen",items:"items",compareWith:"compareWith",clearSearchOnAdd:"clearSearchOnAdd"},outputs:{blurEvent:"blur",focusEvent:"focus",changeEvent:"change",openEvent:"open",closeEvent:"close",searchEvent:"search",clearEvent:"clear",addEvent:"add",removeEvent:"remove",scroll:"scroll",scrollToEnd:"scrollToEnd"},features:[e._Bn([{provide:S.JU,useExisting:(0,e.Gpc)(()=>l),multi:!0},le]),e.TTD],decls:14,vars:19,consts:[[1,"ng-select-container",3,"mousedown"],[1,"ng-value-container"],[1,"ng-placeholder"],[4,"ngIf"],["role","combobox","aria-haspopup","listbox",1,"ng-input"],["aria-autocomplete","list",3,"readOnly","disabled","value","input","compositionstart","compositionend","focus","blur","change"],["searchInput",""],["class","ng-clear-wrapper",3,"title",4,"ngIf"],[1,"ng-arrow-wrapper"],[1,"ng-arrow"],["class","ng-dropdown-panel","role","listbox","aria-label","Options list",3,"virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ng-select-multiple","ngClass","id","update","scroll","scrollToEnd","outsideClick",4,"ngIf"],["class","ng-value",3,"ng-value-disabled",4,"ngFor","ngForOf","ngForTrackBy"],[1,"ng-value"],["defaultLabelTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["aria-hidden","true",1,"ng-value-icon","left",3,"click"],[1,"ng-value-label",3,"ngItemLabel","escape"],["defaultLoadingSpinnerTemplate",""],[3,"ngTemplateOutlet"],[1,"ng-spinner-loader"],[1,"ng-clear-wrapper",3,"title"],["aria-hidden","true",1,"ng-clear"],["role","listbox","aria-label","Options list",1,"ng-dropdown-panel",3,"virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ngClass","id","update","scroll","scrollToEnd","outsideClick"],["class","ng-option",3,"ng-option-disabled","ng-option-selected","ng-optgroup","ng-option","ng-option-child","ng-option-marked","click","mouseover",4,"ngFor","ngForOf","ngForTrackBy"],["class","ng-option","role","option",3,"ng-option-marked","mouseover","click",4,"ngIf"],[1,"ng-option",3,"click","mouseover"],["defaultOptionTemplate",""],[1,"ng-option-label",3,"ngItemLabel","escape"],["role","option",1,"ng-option",3,"mouseover","click"],["defaultTagTemplate",""],[1,"ng-tag-label"],["defaultNotFoundTemplate",""],[1,"ng-option","ng-option-disabled"],["defaultTypeToSearchTemplate",""],["defaultLoadingTextTemplate",""]],template:function(i,o){if(1&i){const u=e.EpF();e.TgZ(0,"div",0),e.NdJ("mousedown",function(h){return o.handleMousedown(h)}),e.TgZ(1,"div",1)(2,"div",2),e._uU(3),e.qZA(),e.YNc(4,Ae,2,2,"ng-container",3),e.YNc(5,De,1,5,null,3),e.TgZ(6,"div",4)(7,"input",5,6),e.NdJ("input",function(){e.CHM(u);const h=e.MAs(8);return e.KtG(o.filter(h.value))})("compositionstart",function(){return o.onCompositionStart()})("compositionend",function(){e.CHM(u);const h=e.MAs(8);return e.KtG(o.onCompositionEnd(h.value))})("focus",function(h){return o.onInputFocus(h)})("blur",function(h){return o.onInputBlur(h)})("change",function(h){return h.stopPropagation()}),e.qZA()()(),e.YNc(9,Ve,4,1,"ng-container",3),e.YNc(10,Ke,3,1,"span",7),e.TgZ(11,"span",8),e._UZ(12,"span",9),e.qZA()(),e.YNc(13,_t,7,19,"ng-dropdown-panel",10)}2&i&&(e.ekj("ng-appearance-outline","outline"===o.appearance)("ng-has-value",o.hasValue),e.xp6(3),e.Oqu(o.placeholder),e.xp6(1),e.Q6J("ngIf",(!o.multiLabelTemplate||!o.multiple)&&o.selectedItems.length>0),e.xp6(1),e.Q6J("ngIf",o.multiple&&o.multiLabelTemplate&&o.selectedValues.length>0),e.xp6(1),e.uIk("aria-expanded",o.isOpen)("aria-owns",o.isOpen?o.dropdownId:null),e.xp6(1),e.Q6J("readOnly",!o.searchable||o.itemsList.maxItemsSelected)("disabled",o.disabled)("value",o.searchTerm?o.searchTerm:""),e.uIk("id",o.labelForId)("tabindex",o.tabIndex)("aria-activedescendant",o.isOpen?null==o.itemsList||null==o.itemsList.markedItem?null:o.itemsList.markedItem.htmlId:null)("aria-controls",o.isOpen?o.dropdownId:null),e.xp6(2),e.Q6J("ngIf",o.loading),e.xp6(1),e.Q6J("ngIf",o.showClear()),e.xp6(3),e.Q6J("ngIf",o.isOpen))},dependencies:[v.mk,v.sg,v.O5,v.tP,Ue,vt],styles:['@charset "UTF-8";.ng-select{position:relative;display:block;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-value{-webkit-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder{display:none}.ng-select .ng-select-container{cursor:default;display:flex;outline:none;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:none;user-select:none;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container,.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;transform:translateZ(0);animation:load8 .8s infinite linear}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@keyframes load8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}.ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-option-label:empty:before{content:"\\200b"}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0}\n'],encapsulation:2,changeDetection:0}),l})();function Dt(){return new Ft}class Ft{constructor(){this._selected=[]}get value(){return this._selected}select(a,i,o){if(a.selected=!0,(!a.children||!i&&o)&&this._selected.push(a),i)if(a.parent){const u=a.parent.children.length,d=a.parent.children.filter(h=>h.selected).length;a.parent.selected=u===d}else a.children&&(this._setChildrenSelectedState(a.children,!0),this._removeChildren(a),this._selected=o&&this._activeChildren(a)?[...this._selected.filter(u=>u.parent!==a),a]:[...this._selected,...a.children.filter(u=>!u.disabled)])}unselect(a,i){if(this._selected=this._selected.filter(o=>o!==a),a.selected=!1,i)if(a.parent&&a.parent.selected){const o=a.parent.children;this._removeParent(a.parent),this._removeChildren(a.parent),this._selected.push(...o.filter(u=>u!==a&&!u.disabled)),a.parent.selected=!1}else a.children&&(this._setChildrenSelectedState(a.children,!1),this._removeChildren(a))}clear(a){this._selected=a?this._selected.filter(i=>i.disabled):[]}_setChildrenSelectedState(a,i){for(const o of a)o.disabled||(o.selected=i)}_removeChildren(a){this._selected=[...this._selected.filter(i=>i.parent!==a),...a.children.filter(i=>i.parent===a&&i.disabled&&i.selected)]}_removeParent(a){this._selected=this._selected.filter(i=>i!==a)}_activeChildren(a){return a.children.every(i=>!i.disabled||i.selected)}}let it=(()=>{class l{}return l.\u0275fac=function(i){return new(i||l)},l.\u0275mod=e.oAB({type:l}),l.\u0275inj=e.cJS({providers:[{provide:ge,useValue:Dt}],imports:[v.ez]}),l})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[501],{8739:(F,f,o)=>{o.d(f,{NW:()=>C,TU:()=>k});var d=o(6895),t=o(4650),b=o(7579),_=o(9101),m=o(4385),u=o(266),c=o(3238),l=o(1281),v=o(9549);function x(a,s){if(1&a&&(t.TgZ(0,"mat-option",19),t._uU(1),t.qZA()),2&a){const e=s.$implicit;t.Q6J("value",e),t.xp6(1),t.hij(" ",e," ")}}function T(a,s){if(1&a){const e=t.EpF();t.TgZ(0,"mat-form-field",16)(1,"mat-select",17),t.NdJ("selectionChange",function(n){t.CHM(e);const g=t.oxw(2);return t.KtG(g._changePageSize(n.value))}),t.YNc(2,x,2,2,"mat-option",18),t.qZA()()}if(2&a){const e=t.oxw(2);t.Q6J("appearance",e._formFieldAppearance)("color",e.color),t.xp6(1),t.Q6J("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),t.xp6(1),t.Q6J("ngForOf",e._displayedPageSizeOptions)}}function I(a,s){if(1&a&&(t.TgZ(0,"div",20),t._uU(1),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.Oqu(e.pageSize)}}function z(a,s){if(1&a&&(t.TgZ(0,"div",12)(1,"div",13),t._uU(2),t.qZA(),t.YNc(3,T,3,8,"mat-form-field",14),t.YNc(4,I,2,1,"div",15),t.qZA()),2&a){const e=t.oxw();t.xp6(1),t.s9C("id",e._pageSizeLabelId),t.xp6(1),t.hij(" ",e._intl.itemsPerPageLabel," "),t.xp6(1),t.Q6J("ngIf",e._displayedPageSizeOptions.length>1),t.xp6(1),t.Q6J("ngIf",e._displayedPageSizeOptions.length<=1)}}function M(a,s){if(1&a){const e=t.EpF();t.TgZ(0,"button",21),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.firstPage())}),t.O4$(),t.TgZ(1,"svg",7),t._UZ(2,"path",22),t.qZA()()}if(2&a){const e=t.oxw();t.Q6J("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),t.uIk("aria-label",e._intl.firstPageLabel)}}function O(a,s){if(1&a){const e=t.EpF();t.O4$(),t.kcU(),t.TgZ(0,"button",23),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.lastPage())}),t.O4$(),t.TgZ(1,"svg",7),t._UZ(2,"path",24),t.qZA()()}if(2&a){const e=t.oxw();t.Q6J("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),t.uIk("aria-label",e._intl.lastPageLabel)}}let r=(()=>{class a{constructor(){this.changes=new b.x,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(e,i,n)=>{if(0==n||0==i)return`0 of ${n}`;const g=e*i;return`${g+1} \u2013 ${g<(n=Math.max(n,0))?Math.min(g+i,n):g+i} of ${n}`}}}return a.\u0275fac=function(e){return new(e||a)},a.\u0275prov=t.Yz7({token:a,factory:a.\u0275fac,providedIn:"root"}),a})();const S={provide:r,deps:[[new t.FiY,new t.tp0,r]],useFactory:function D(a){return a||new r}},E=new t.OlP("MAT_PAGINATOR_DEFAULT_OPTIONS"),A=(0,c.Id)((0,c.dB)(class{}));let y=(()=>{class a extends A{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max((0,l.su)(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=(0,l.su)(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max((0,l.su)(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(i=>(0,l.su)(i)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(e){this._hidePageSize=(0,l.Ig)(e)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(e){this._showFirstLastButtons=(0,l.Ig)(e)}constructor(e,i,n){if(super(),this._intl=e,this._changeDetectorRef=i,this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this._hidePageSize=!1,this._showFirstLastButtons=!1,this.selectConfig={},this.page=new t.vpe,this._intlChanges=e.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),n){const{pageSize:g,pageSizeOptions:p,hidePageSize:h,showFirstLastButtons:P}=n;null!=g&&(this._pageSize=g),null!=p&&(this._pageSizeOptions=p),null!=h&&(this._hidePageSize=h),null!=P&&(this._showFirstLastButtons=P)}}ngOnInit(){this._initialized=!0,this._updateDisplayedPageSizeOptions(),this._markInitialized()}ngOnDestroy(){this._intlChanges.unsubscribe()}nextPage(){if(!this.hasNextPage())return;const e=this.pageIndex;this.pageIndex=this.pageIndex+1,this._emitPageEvent(e)}previousPage(){if(!this.hasPreviousPage())return;const e=this.pageIndex;this.pageIndex=this.pageIndex-1,this._emitPageEvent(e)}firstPage(){if(!this.hasPreviousPage())return;const e=this.pageIndex;this.pageIndex=0,this._emitPageEvent(e)}lastPage(){if(!this.hasNextPage())return;const e=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(e)}hasPreviousPage(){return this.pageIndex>=1&&0!=this.pageSize}hasNextPage(){const e=this.getNumberOfPages()-1;return this.pageIndex<e&&0!=this.pageSize}getNumberOfPages(){return this.pageSize?Math.ceil(this.length/this.pageSize):0}_changePageSize(e){const n=this.pageIndex;this.pageIndex=Math.floor(this.pageIndex*this.pageSize/e)||0,this.pageSize=e,this._emitPageEvent(n)}_nextButtonsDisabled(){return this.disabled||!this.hasNextPage()}_previousButtonsDisabled(){return this.disabled||!this.hasPreviousPage()}_updateDisplayedPageSizeOptions(){this._initialized&&(this.pageSize||(this._pageSize=0!=this.pageSizeOptions.length?this.pageSizeOptions[0]:50),this._displayedPageSizeOptions=this.pageSizeOptions.slice(),-1===this._displayedPageSizeOptions.indexOf(this.pageSize)&&this._displayedPageSizeOptions.push(this.pageSize),this._displayedPageSizeOptions.sort((e,i)=>e-i),this._changeDetectorRef.markForCheck())}_emitPageEvent(e){this.page.emit({previousPageIndex:e,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}}return a.\u0275fac=function(e){t.$Z()},a.\u0275dir=t.lG2({type:a,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[t.qOj]}),a})(),B=0,C=(()=>{class a extends y{constructor(e,i,n){super(e,i,n),this._pageSizeLabelId="mat-paginator-page-size-label-"+B++,this._formFieldAppearance=n?.formFieldAppearance||"outline"}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(r),t.Y36(t.sBO),t.Y36(E,8))},a.\u0275cmp=t.Xpm({type:a,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[t.qOj],decls:14,vars:14,consts:[[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],["class","mat-mdc-paginator-page-size",4,"ngIf"],[1,"mat-mdc-paginator-range-actions"],["aria-live","polite",1,"mat-mdc-paginator-range-label"],["mat-icon-button","","type","button","class","mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-previous",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["viewBox","0 0 24 24","focusable","false",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-next",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button","class","mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-page-size-label",3,"id"],["class","mat-mdc-paginator-page-size-select",3,"appearance","color",4,"ngIf"],["class","mat-mdc-paginator-page-size-value",4,"ngIf"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],[3,"value","disabled","aria-labelledby","panelClass","disableOptionCentering","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"mat-mdc-paginator-page-size-value"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t.YNc(2,z,5,4,"div",2),t.TgZ(3,"div",3)(4,"div",4),t._uU(5),t.qZA(),t.YNc(6,M,3,5,"button",5),t.TgZ(7,"button",6),t.NdJ("click",function(){return i.previousPage()}),t.O4$(),t.TgZ(8,"svg",7),t._UZ(9,"path",8),t.qZA()(),t.kcU(),t.TgZ(10,"button",9),t.NdJ("click",function(){return i.nextPage()}),t.O4$(),t.TgZ(11,"svg",7),t._UZ(12,"path",10),t.qZA()(),t.YNc(13,O,3,5,"button",11),t.qZA()()()),2&e&&(t.xp6(2),t.Q6J("ngIf",!i.hidePageSize),t.xp6(3),t.hij(" ",i._intl.getRangeLabel(i.pageIndex,i.pageSize,i.length)," "),t.xp6(1),t.Q6J("ngIf",i.showFirstLastButtons),t.xp6(1),t.Q6J("matTooltip",i._intl.previousPageLabel)("matTooltipDisabled",i._previousButtonsDisabled())("matTooltipPosition","above")("disabled",i._previousButtonsDisabled()),t.uIk("aria-label",i._intl.previousPageLabel),t.xp6(3),t.Q6J("matTooltip",i._intl.nextPageLabel)("matTooltipDisabled",i._nextButtonsDisabled())("matTooltipPosition","above")("disabled",i._nextButtonsDisabled()),t.uIk("aria-label",i._intl.nextPageLabel),t.xp6(3),t.Q6J("ngIf",i.showFirstLastButtons))},dependencies:[d.sg,d.O5,_.RK,v.KE,m.gD,c.ey,u.gM],styles:[".mat-mdc-paginator{display:block}.mat-mdc-paginator .mat-mdc-form-field-subscript-wrapper{display:none}.mat-mdc-paginator .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap-reverse;width:100%}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px}[dir=rtl] .mat-mdc-paginator-icon{transform:rotate(180deg)}.cdk-high-contrast-active .mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon,.cdk-high-contrast-active .mat-mdc-paginator-icon{fill:currentColor;fill:CanvasText}.cdk-high-contrast-active .mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0}),a})(),k=(()=>{class a{}return a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=t.oAB({type:a}),a.\u0275inj=t.cJS({providers:[S],imports:[d.ez,_.ot,m.LD,u.AV]}),a})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[512],{5512:(J,d,n)=>{n.r(d),n.d(d,{LogisticModule:()=>l});var a=n(6895),m=n(284),u=n(1889),L=n(4782),S=n(8505),C=n(4004),t=n(4650),Z=n(1318),T=n(7185),g=n(4006),f=n(7481),p=n(8796),v=n(266);function O(o,i){if(1&o&&(t.TgZ(0,"span",14),t._UZ(1,"img",15),t.qZA(),t._uU(2)),2&o){const e=i.item;t.xp6(1),t.Q6J("src",e.logo,t.LSH),t.xp6(1),t.hij(" ",e.Name," ")}}function b(o,i){if(1&o){const e=t.EpF();t.ynx(0),t.TgZ(1,"ng-select",17),t.NdJ("ngModelChange",function(h){t.CHM(e);const y=t.oxw().$implicit;return t.KtG(y.ProductSKU=h)}),t.qZA(),t.BQk()}if(2&o){const e=i.ngIf,s=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",s.ProductSKU)("items",e)}}function U(o,i){if(1&o&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA(),t.TgZ(7,"td"),t.YNc(8,b,2,2,"ng-container",16),t.ALo(9,"async"),t.qZA()()),2&o){const e=i.$implicit,s=t.oxw();t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Service),t.xp6(2),t.Oqu(e.TypeString),t.xp6(2),t.Q6J("ngIf",t.lcZ(9,4,s.logisticOptions$))}}class r{constructor(i,e){this.http=i,this.toastr=e,this.filter={ChannelID:""},this.logisticServiceOptions=[],this.initLoader()}initLoader(){this.http.post("/api/Logistic/Load",{}).subscribe(i=>{this.channelOptions=u.g.assignChannelLogo(i.Options.Channel),this.filter=i.Filter,this.channelName=this.channelOptions[0].Name,this.initLogisticServiceOptions(),this.getLogisticService()})}initLogisticServiceOptions(){this.logisticOptions$=this.http.get("/api/Logistic/OptionLogisticsService").pipe((0,L.d)(1),(0,S.b)(i=>{this.logisticServiceOptions=i}))}Validate(){for(let i of this.logisticServices)void 0===this.datasource.find(s=>s.ProductSKU==i.ProductSKU&&s.Name==i.Name)&&(i.IsChange=!0);return Promise.resolve(this.logisticServices)}submitLogistics(){this.Validate().then(i=>{this.http.post("/api/Logistic/Submit",this.logisticServices).subscribe(e=>{this.toastr.success("Success","Update Complete!",{timeOut:5e3,enableHtml:!0}),this.getLogisticService()})})}getLogisticService(){this.datasource=[],this.http.post("/api/Logistic/Get",this.filter).pipe((0,C.U)(i=>i.map(e=>(e.ProductSKU=u.g.IsEmpty(e.ProductSKU)?null:e.ProductSKU,e)))).subscribe(i=>{this.iniTitle(),this.logisticServices=i,this.datasource=structuredClone(i)})}iniTitle(){let i=this.channelOptions.find(e=>e.ID==this.filter.ChannelID);this.channelName=i?i.Name:null}}r.\u0275fac=function(i){return new(i||r)(t.Y36(Z.O),t.Y36(T._W))},r.\u0275cmp=t.Xpm({type:r,selectors:[["app-logistic"]],decls:29,vars:6,consts:[["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"headerTitle","hideSearchDropdown","onSubmit"],["container",""],[1,"mb-3","fw-normal"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp",""],["role","button","data-toggle","tooltip","data-placement","top","matTooltip","enter Logistic for recorded",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[4,"ngIf"],["placeholder","Logistic Service Code","bindLabel","Name","bindValue","Code",1,"w-75",3,"ngModel","items","ngModelChange"]],template:function(i,e){1&i&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(){return e.getLogisticService()}),t.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h5",2),t._uU(5,"Select a Channel"),t.qZA(),t.TgZ(6,"ng-select",3),t.NdJ("ngModelChange",function(h){return e.filter.ChannelID=h}),t.YNc(7,O,3,2,"ng-template",4),t.qZA()()()(),t.TgZ(8,"actions")(9,"a",5),t.NdJ("click",function(){return e.submitLogistics()}),t._uU(10,"Submit"),t.qZA()(),t.TgZ(11,"content")(12,"div",6)(13,"div",7)(14,"div",8)(15,"div",9)(16,"table",10)(17,"thead",11)(18,"tr",12)(19,"th"),t._uU(20,"Logistic"),t.qZA(),t.TgZ(21,"th"),t._uU(22,"Service"),t.qZA(),t.TgZ(23,"th"),t._uU(24,"Type"),t.qZA(),t.TgZ(25,"th"),t._uU(26,"Logistic Service"),t.qZA()()(),t.TgZ(27,"tbody"),t.YNc(28,U,10,6,"tr",13),t.qZA()()()()()()()()),2&i&&(t.Q6J("headerTitle","Logistic Courier - "+e.channelName)("hideSearchDropdown",!1),t.xp6(6),t.Q6J("clearable",!1)("items",e.channelOptions)("ngModel",e.filter.ChannelID),t.xp6(22),t.Q6J("ngForOf",e.logisticServices))},dependencies:[a.sg,a.O5,g.JJ,g.On,f.p,p.w9,p.ir,v.gM,a.Ov]});const A=[{path:"",component:r}];class c{}c.\u0275fac=function(i){return new(i||c)},c.\u0275mod=t.oAB({type:c}),c.\u0275inj=t.cJS({imports:[a.ez,m.Bz.forChild(A)]});var N=n(455),M=n(1948);class l{}l.\u0275fac=function(i){return new(i||l)},l.\u0275mod=t.oAB({type:l}),l.\u0275inj=t.cJS({imports:[a.ez,m.Bz,c,g.u5,f.R,p.A0,N.rP,M.Fk,v.AV]})}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[53],{9053:(xn,$,c)=>{c.r($),c.d($,{StatusModule:()=>Z});var d=c(6895),t=c(4650),H=c(2937),S=c(284);const W=function(){return["/menu/products/download/by-url"]};class O{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listed SKU",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"}]}}O.\u0275fac=function(e){return new(e||O)},O.\u0275cmp=t.Xpm({type:O,selectors:[["app-status"]],decls:13,vars:3,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-flex"],[1,"dropdown-item",3,"routerLink"]],template:function(e,n){1&e&&(t.TgZ(0,"nav",0)(1,"div",1)(2,"div"),t._UZ(3,"nav-tab",2),t.qZA()(),t.TgZ(4,"div")(5,"div",3)(6,"a",4),t._UZ(7,"i",5),t.qZA(),t.TgZ(8,"div",6)(9,"div",7)(10,"a",8),t._uU(11,"Download Product By Url"),t.qZA()()()()()(),t._UZ(12,"router-outlet")),2&e&&(t.xp6(3),t.Q6J("Tabs",n.productTabs),t.xp6(7),t.Q6J("routerLink",t.DdM(2,W)))},dependencies:[H.e,S.lC,S.rH]});var E=c(1290),_=c(8231),g=c(5412),s=c(1889),p=c(9694),C=(()=>{return(i=C||(C={})).Tokopedia="https://seller.tokopedia.com",i.Shoope="https://seller.shopee.co.id",i.Tiktok="https://seller-id.tiktok.com",i.WooCommerce="https://woocommerce.dealpos.app",i.Lazada="https://sellercenter.lazada.co.id",C;var i})(),K=c(6779),N=c(266),V=c(6401);function X(i,e){if(1&i&&(t.ynx(0),t.TgZ(1,"tr")(2,"td",11),t._uU(3),t.qZA(),t.TgZ(4,"td",11),t._uU(5),t.qZA(),t.TgZ(6,"td",12)(7,"p",13),t._uU(8,"Product Not in Channel!"),t.qZA()()(),t.BQk()),2&i){const n=t.oxw().$implicit;t.xp6(3),t.hij(" ",null==n?null:n.Model,""),t.xp6(2),t.hij(" ",null==n?null:n.Code,"")}}function tt(i,e){if(1&i&&(t.TgZ(0,"td",11),t._uU(1),t.qZA()),2&i){const n=t.oxw(3).$implicit;t.uIk("rowspan",n.Channel.length),t.xp6(1),t.hij(" ",null==n?null:n.Model,"")}}function nt(i,e){if(1&i&&(t.TgZ(0,"td",11),t._uU(1),t.qZA()),2&i){const n=t.oxw(3).$implicit;t.uIk("rowspan",n.Channel.length),t.xp6(1),t.hij(" ",null==n?null:n.Code,"")}}const et=function(i){return{"is-disabled":i}};function ot(i,e){if(1&i&&(t.TgZ(0,"tr"),t.YNc(1,tt,2,2,"td",14),t.YNc(2,nt,2,2,"td",14),t.TgZ(3,"td",11)(4,"div",15)(5,"a",16),t._UZ(6,"img",17),t.qZA(),t.TgZ(7,"div",18),t._uU(8),t.qZA()()(),t.TgZ(9,"td",11),t._uU(10),t.ALo(11,"number"),t.qZA(),t.TgZ(12,"td",19),t._uU(13),t.ALo(14,"number"),t.qZA(),t.TgZ(15,"td",19)(16,"a",20),t._UZ(17,"i",21),t.TgZ(18,"span",22),t._uU(19,"Edit"),t.qZA()()()()),2&i){const n=e.$implicit,o=e.index,a=t.oxw(3);t.xp6(1),t.Q6J("ngIf",0==o),t.xp6(1),t.Q6J("ngIf",0==o),t.xp6(3),t.Q6J("href",n.Url,t.LSH)("title",n.Title),t.xp6(1),t.Q6J("src",a.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.Q6J("matTooltip",(null==n||null==n.Name?null:n.Name.length)>55?null==n?null:n.Name:""),t.xp6(1),t.hij(" ",n.Name," "),t.xp6(2),t.Oqu(t.lcZ(11,12,n.Price)),t.xp6(3),t.Oqu(t.lcZ(14,14,n.Inventory)),t.xp6(3),t.Q6J("href",a.getHyperlinkSellerCenter(n),t.LSH)("ngClass",t.VKq(16,et,n.TypeID==a.channelType.KalCare))("matTooltip",n.TypeID!=a.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function it(i,e){if(1&i&&t.YNc(0,ot,20,18,"tr",8),2&i){const n=t.oxw().$implicit;t.Q6J("ngForOf",null==n?null:n.Channel)}}function at(i,e){if(1&i&&(t.ynx(0),t.YNc(1,X,9,2,"ng-container",9),t.YNc(2,it,1,1,"ng-template",null,10,t.W1O),t.BQk()),2&i){const n=e.$implicit,o=t.MAs(3);t.xp6(1),t.Q6J("ngIf",!n.Channel||n.Channel.length<1)("ngIfElse",o)}}class I{constructor(e,n){this.data=e,this.dialogRef=n,this.channelType=p.x,this.variants=e.variants,this.title=e.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new K.O,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideCancel=!0,this.modalConfig.hideOk=!0}getChannelLogo(e){return s.g.getChannelLogoByTypeId(e)}getHyperlinkSellerCenter(e){let n="javascript:void(0)";switch(e.TypeID){case p.x.ShopeeV2:n=`${C.Shoope}/portal/product/${e.ChannelItemID}`;break;case p.x.Tiktok:n=`${C.Tiktok}/product/edit/${e.ChannelItemID}`;break;case p.x.Tokopedia:n=`${C.Tokopedia}/edit-product/${e.ChannelItemID}`;break;case p.x.WooCommerce:n=`${C.WooCommerce}/wp-admin/post.php?post=${e.ChannelItemID}&action=edit`;break;case p.x.Lazada:n=`${C.Lazada}/apps/product/publish?productId=${e.ChannelItemID}`}return n}}I.\u0275fac=function(e){return new(e||I)(t.Y36(g.WI),t.Y36(g.so))},I.\u0275cmp=t.Xpm({type:I,selectors:[["app-modal-variant"]],decls:22,vars:2,consts:[[3,"config","onCancel"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"text-start","sticky-top"],["matTooltip","Variant from POS",1,"fas","fa-info-circle","ms-1"],["matTooltip","Product and Variant from each Channel",1,"fas","fa-info-circle","ms-1"],[1,"text-start","sticky-top",2,"width","0%"],[4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["printChannelModal",""],[1,"text-start"],["colspan","3",1,"text-center"],[1,"my-auto"],["class","text-start",4,"ngIf"],[1,"d-flex"],["target","_blank",1,"me-1",3,"href","title"],[2,"width","20px","height","20px",3,"src"],[1,"text-ellipsis","ps-2",2,"max-width","18vw",3,"matTooltip"],[1,"text-center"],["target","_blank",1,"btn","btn-small","btn-light","px-4","py-2",3,"href","ngClass","matTooltip"],[1,"fa-solid","fa-pencil","me-2",2,"font-size","10px"],[1,"fs-6"]],template:function(e,n){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onCancel",function(){return n.dialogRef.close()}),t.TgZ(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),t._uU(6," VARIANT "),t.TgZ(7,"sup"),t._UZ(8,"i",5),t.qZA()(),t.TgZ(9,"th",4),t._uU(10,"SKU"),t.qZA(),t.TgZ(11,"th",4),t._uU(12," PRODUCT "),t.TgZ(13,"sup"),t._UZ(14,"i",6),t.qZA()(),t.TgZ(15,"th",4),t._uU(16,"PRICE"),t.qZA(),t.TgZ(17,"th",7),t._uU(18,"INVENTORY"),t.qZA(),t._UZ(19,"th",4),t.qZA()(),t.TgZ(20,"tbody"),t.YNc(21,at,4,2,"ng-container",8),t.qZA()()()()),2&e&&(t.Q6J("config",n.modalConfig),t.xp6(21),t.Q6J("ngForOf",n.variants))},dependencies:[d.mk,d.sg,d.O5,N.gM,V.M,d.JJ],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#fff!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}a.is-disabled[_ngcontent-%COMP%]{color:gray;cursor:default}a.is-disabled[_ngcontent-%COMP%]:hover{text-decoration:none}"]});var u=c(9300),x=c(3900),R=c(7579),Y=c(2722),lt=c(9646),rt=c(9568),T=c(1318);class y{constructor(e,n){this.LocalData=e,this.httpService=n}getCategoriesByTypeId(e,n){return this.LocalData.getCategoriesByChannelType(e).pipe((0,x.w)(o=>null!=o?(0,lt.of)(o):this._getCategoriesByTypeID(e,n)))}_getCategoriesByTypeID(e,n){return this.httpService.post("/api/Channel/getCategoriesByTypeID",{TypeID:e,ID:n}).pipe((0,x.w)(a=>this.LocalData.saveCategoriesByChannelType(a,e)))}}y.\u0275fac=function(e){return new(e||y)(t.LFG(rt.T),t.LFG(T.O))},y.\u0275prov=t.Yz7({token:y,factory:y.\u0275fac,providedIn:"root"});var v=c(7185),h=c(4006),ct=c(8158);function st(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"ng-select-infinite",16),t.NdJ("selectedChange",function(a){t.CHM(n);const l=t.oxw().index,r=t.oxw();return t.KtG(r.onSelectCategory(a,l))}),t.qZA(),t.BQk()}if(2&i){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("items",n.Categories)("clearable",!1)}}function dt(i,e){if(1&i&&(t.TgZ(0,"div",17),t._UZ(1,"input",18),t.qZA()),2&i){const n=t.oxw().$implicit,o=t.oxw();t.xp6(1),t.Q6J("placeholder",o.getChannelCategory(n.TypeID))}}function pt(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"tr")(2,"td",9)(3,"input",10),t.NdJ("ngModelChange",function(a){const r=t.CHM(n).$implicit;return t.KtG(r.Selected=a)})("ngModelChange",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onSelectChannel())}),t.qZA()(),t.TgZ(4,"td")(5,"div",11),t._UZ(6,"img",12),t.TgZ(7,"span",13),t._uU(8),t.qZA()()(),t.TgZ(9,"td"),t.YNc(10,st,2,2,"ng-container",14),t.YNc(11,dt,2,1,"ng-template",null,15,t.W1O),t.qZA()(),t.BQk()}if(2&i){const n=e.$implicit,o=t.MAs(12);t.xp6(3),t.Q6J("ngModel",n.Selected),t.xp6(3),t.Q6J("src",n.Img,t.LSH),t.xp6(2),t.Oqu(n.Name),t.xp6(2),t.Q6J("ngIf",n.Categories.length>0)("ngIfElse",o)}}class m{constructor(e,n,o,a){this.data=e,this.channelService=n,this.dialogRef=o,this.toastrService=a,this.channelOptions=[],this.uploadResponse=[],this.channelType=p.x,this.enableBtnOk=!1,this.destroy$=new R.x,this.uploadResponse=[],this.channels=this.data.channels}ngOnInit(){this.initModalConfig(),this.initChannelOptions(),this.initCategories()}initModalConfig(){this.modalConfig=new K.O,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0}initCategories(){this.filterChannelTypeId().forEach(n=>{this.channelService.getCategoriesByTypeId(n.channelType,n.channelId).pipe((0,Y.R)(this.destroy$)).subscribe(o=>{this.setCategoriesChannelOption(n.channelType,o)})})}setCategoriesChannelOption(e,n){this.channelOptions=this.channelOptions.map(o=>(o.TypeID==e&&(o.Categories=n),o))}initChannelOptions(){this.channelOptions=this.channels.map(e=>({Name:e.Name,Img:e.Img,ID:e.ID,Selected:!1,CategoryID:this.initDefaultChannelCategoryId(e.TypeID),TypeID:e.TypeID,Categories:[]}))}initDefaultChannelCategoryId(e){let n=0;return e===p.x.Lazada&&(n=6509),n}filterChannelTypeId(){return this.data.channels.map(n=>({channelType:n.TypeID,channelId:n.ID})).filter((n,o,a)=>a.findIndex(l=>n.channelType==l.channelType)==o).filter(n=>n.channelType==p.x.Tokopedia)}onSelectCategory(e,n){this.channelOptions[n].CategoryID=e,this.channelOptions[n].Selected=!0,this.onSelectChannel()}onSelectAllChannel(e){this.channelOptions=this.channelOptions.map(n=>(n.Selected=e,n)),this.enableBtnOk=e}onSelectChannel(){this.enableBtnOk=this.hasSelectedChannel()}hasSelectedChannel(){return-1!==this.channelOptions.findIndex(e=>e.Selected)}onClose(){this.dialogRef.close("CANCEL")}onSave(){if(!this.validateSelectedCategory())return void this.toastrService.warning("Category is required","Warning!");const e=this.channelOptions.filter(n=>n.Selected).map(n=>({CategoryID:n.CategoryID,ChannelID:n.ID}));this.dialogRef.close(e)}validateSelectedCategory(){return-1==this.channelOptions.filter(n=>n.Selected).filter(n=>n.TypeID==p.x.Tokopedia).findIndex(n=>0==n.CategoryID)}getChannelCategory(e){let n;switch(e){case p.x.ShopeeV2:n="Aksesoris Fashion";break;case p.x.Tiktok:n="Aksesoris Fashion - Aksesoris Pakaian";break;case p.x.WooCommerce:n="New Product";break;case p.x.Lazada:n="Fashion Accessories / Women Accessories / Others";break;default:n="Unavailable Category"}return n}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}m.\u0275fac=function(e){return new(e||m)(t.Y36(g.WI),t.Y36(y),t.Y36(g.so),t.Y36(v._W))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-modal-uploadMultiple-product"]],decls:15,vars:3,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[1,"table"],[1,"text-center",2,"width","6%"],["type","checkbox",3,"change"],[2,"width","30%"],[1,"fs-6"],[2,"width","60%"],[4,"ngFor","ngForOf"],[1,"text-center"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"d-flex","align-items-center"],["alt","",1,"channel-logo-size",3,"src"],[1,"ms-3","fs-6"],[4,"ngIf","ngIfElse"],["EMPTY",""],["bindValue","Key","bindLabel","Value","width","100%","parent","body","position","top","placeholder","Select Category",3,"items","clearable","selectedChange"],["matTooltip","Product Category is Harcoded, Please Change Product Category in Seller Center","matTooltipPosition","above","matTooltipClass","custom-width-tooltip"],["type","text","disabled","",1,"form-control","rounded",2,"height","40px",3,"placeholder"]],template:function(e,n){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return n.onSave()})("onClose",function(){return n.onClose()})("onCancel",function(){return n.onClose()}),t.TgZ(1,"div",1)(2,"table",2)(3,"thead")(4,"tr")(5,"th",3)(6,"input",4),t.NdJ("change",function(a){return n.onSelectAllChannel(a.target.checked)}),t.qZA()(),t.TgZ(7,"th",5)(8,"span",6),t._uU(9,"CHANNEL"),t.qZA()(),t.TgZ(10,"th",7)(11,"span",6),t._uU(12,"CATEGORY"),t.qZA()()()(),t.TgZ(13,"tbody"),t.YNc(14,pt,13,5,"ng-container",8),t.qZA()()()()),2&e&&(t.Q6J("dynamicValidated",n.enableBtnOk)("config",n.modalConfig),t.xp6(14),t.Q6J("ngForOf",n.channelOptions))},dependencies:[d.sg,d.O5,h.Wl,h.JJ,h.On,N.gM,V.M,ct.R],styles:["input[type=checkbox]{width:15px;height:15px}img.channel-logo-size{width:24px;height:24px}table>thead>tr{border-top:none!important;border-left:none!important;border-right:none!important}\n"],encapsulation:2});var M=c(6082),P=c(7481),f=c(8796),F=c(6732),B=c(6956),b=c(9640),A=c(9602);function ht(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",15),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onOpenScanDialog())}),t._UZ(1,"i",16),t._uU(2," Scan Channel "),t.qZA()}}function ut(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",17),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onScanMultipleProduct())}),t._UZ(1,"i",16),t._uU(2),t.qZA()}if(2&i){const n=t.oxw();let o;t.xp6(2),t.hij(" Scan (",null==(o=n.productService.selectedProduct(n.products))?null:o.length,") ")}}function gt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",18),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onUploadMultipleProduct())}),t._UZ(1,"i",19),t._uU(2),t.qZA()}if(2&i){const n=t.oxw();let o;t.xp6(2),t.hij(" Upload (",null==(o=n.productService.selectedProduct(n.products))?null:o.length,") ")}}function _t(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",20)(1,"app-product-card",21),t.NdJ("onUpload",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onUploadToMultipleChannel(l))})("onScan",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onScanSingleProduct(l))})("onDescEvent",function(){const l=t.CHM(n).index,r=t.oxw();return t.KtG(r.onOpenDialogVariant(l))})("onCheckBoxChange",function(a){const r=t.CHM(n).$implicit;return t.KtG(r.selected=a)}),t.qZA()()}if(2&i){const n=e.$implicit,o=t.oxw();t.xp6(1),t.Q6J("productId",n.ID)("title",null==n?null:n.Name)("image",null==n?null:n.ThumbnailUrl)("description",(null==n?null:n.Variants.length)>1?(null==n?null:n.Variants.length)+" Variants":null)("channels",o.productService.getChannelProduct(n))("code",o.getVariantCode(null==n?null:n.Variants))("showCheckBox",(null==n?null:n.Channel.length)<o.channelOptions.length)("scanButton",!0)("uploadButton",null==n?null:n.hasUpload)("imageForZoom",null==n?null:n.ImageUrl)}}function mt(i,e){1&i&&(t.ynx(0),t.TgZ(1,"div",22),t._UZ(2,"app-empty-state"),t.qZA(),t.BQk())}function Ct(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",23)(2,"div",24)(3,"app-custom-paginator",25),t.NdJ("next",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onNextPage())})("previous",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onPrevPage())}),t.qZA()()(),t.BQk()}if(2&i){const n=t.oxw();t.xp6(3),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",!0)}}class k{constructor(e,n,o,a){this.http=e,this.toastr=n,this.dialog=o,this.productService=a,this.searchFilter=new E.k,this.products=[],this.rowCount=0,this.getLoaderPage()}getLoaderPage(){this.productService.LoadInPOS().subscribe(e=>{this.channelOptions=e.Options.Channel,this.Categories=e.Options.Categories,this.searchFilter.PageNumber=e.Filter.PageNumber,this.searchFilter.RowCount=e.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=e.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}getProducts(){this.http.post("/api/product/GetInPOS",{PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate}).subscribe(n=>{this.products=n.Data,this.rowCount=null==n.Total?this.searchFilter.RowCount:n.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=s.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe((0,u.h)(o=>s.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scanAllProduct()})}scanAllProduct(){null!=this.searchFilter.ChannelID?this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(e,n,!this.searchFilter.UpdatedProduct)}}):this.toastr.error("Please Select Channel","Error")}onOpenDialogVariant(e){this.dialog.open(I,{data:{title:this.products[e].Name,variants:this.products[e].Variants},width:"800px"})}onUploadMultipleProduct(){let e=this.productService.selectedProduct(this.products),n=this.productService.filterUnselectedChannel(e,this.channelOptions);this.dialog.open(m,{width:"700px",data:{title:"Upload Multiple Product",channels:n}}).afterClosed().pipe((0,u.h)(o=>"CANCEL"!==o),(0,x.w)(o=>this.productService.uploadMultipleProduct(e,o))).subscribe({next:o=>{this.getProducts()}})}onUploadToMultipleChannel(e){let n=this.productService.getChannelProduct(e);e.Channel=n;let o=this.productService.filterUnselectedChannel([e],this.channelOptions);this.dialog.open(m,{width:"700px",data:{title:`Upload - ${e.Name}`,channels:o}}).afterClosed().pipe((0,u.h)(a=>"CANCEL"!==a),(0,x.w)(a=>this.productService.uploadSingleProduct([e],a))).subscribe({next:a=>{this.getProducts()}})}searchProduct(e){this.searchFilter.text=e,this.getProducts()}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}onScanMultipleProduct(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=s.g.GuidEMpty;let n=this.productService.filterChannelByTypeId(this.channelOptions,[p.x.Tokopedia,p.x.Tiktok]);this.dialog.open(_.j,{data:{filter:e,channelOptions:n,isSingleChannel:!0},width:"600px"}).afterClosed().pipe((0,u.h)(a=>s.g.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.UpdatedProduct=a.UpdatedProduct;let l=this.productService.selectedProduct(this.products),r=this.productService.getVariantCodesProducts(l);this.scanSingleProduct(r)})}onScanSingleProduct(e){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=s.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe((0,u.h)(o=>s.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID;const a=this.productService.getVariantCodesProduct(e);this.scanSingleProduct(a)})}scanSingleProduct(e){this.productService.scanSingle(this.searchFilter.ChannelID,e).subscribe({next:n=>{if(n)this.toastr.success("Successfully Scan ","Success");else{let o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${o?.Name} `,"Error")}this.searchFilter.ChannelID=s.g.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=s.g.GuidEMpty}})}getVariantCode(e){let n;return e.length>1&&(n=(e[0].model?e[0].model:"")+e[0].Code),1==e.length&&(n=e[0].Code),n}}function ft(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onOpenScanDialog())}),t._UZ(1,"i",14),t._uU(2," Scan Channel "),t.qZA()}}function xt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",15),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onScanMultipleProduct())}),t._UZ(1,"i",14),t._uU(2),t.qZA()}if(2&i){const n=t.oxw();t.xp6(2),t.hij(" Scan (",n.productService.selectedProduct(n.products).length,") ")}}function Pt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",16),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onUploadMultipleProduct())}),t._UZ(1,"i",17),t._uU(2),t.qZA()}if(2&i){const n=t.oxw();t.xp6(2),t.hij(" Upload (",n.productService.selectedProduct(n.products).length,") ")}}function bt(i,e){if(1&i&&(t.TgZ(0,"span",18),t._UZ(1,"img",19),t.qZA(),t._uU(2)),2&i){const n=e.item,o=t.oxw();t.xp6(1),t.Q6J("src",o.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}function St(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div")(1,"h6"),t._uU(2,"Item ID"),t.qZA(),t.TgZ(3,"input",20),t.NdJ("ngModelChange",function(a){t.CHM(n);const l=t.oxw();return t.KtG(l.searchFilter.Item_id=a)}),t.qZA()()}if(2&i){const n=t.oxw();t.xp6(3),t.Q6J("ngModel",n.searchFilter.Item_id)}}function It(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",21)(1,"app-product-card",22),t.NdJ("onUpload",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onUploadToMultipleChannel(l))})("onDescEvent",function(){const l=t.CHM(n).index,r=t.oxw();return t.KtG(r.onOpenVariantDetail(l))})("onScan",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onScanSingleProduct(l))})("onCheckBoxChange",function(a){const r=t.CHM(n).$implicit;return t.KtG(r.selected=a)}),t.qZA()()}if(2&i){const n=e.$implicit,o=t.oxw();t.xp6(1),t.Q6J("productId",null==n?null:n.ID)("title",null==n?null:n.Name)("image",null==n?null:n.ThumbnailUrl)("description",(null==n||null==n.Variants?null:n.Variants.length)>1?(null==n||null==n.Variants?null:n.Variants.length)+" Variants":null)("channels",o.productService.getChannelProduct(n))("code",o.getVariantCode(null==n?null:n.Variants))("showCheckBox",null==n?null:n.hasScan)("scanButton",!0)("uploadButton",null==n?null:n.hasUpload)("imageForZoom",null==n?null:n.ImageUrl)}}function Tt(i,e){1&i&&(t.ynx(0),t.TgZ(1,"div",23),t._UZ(2,"app-empty-state"),t.qZA(),t.BQk())}function yt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",24)(1,"div",25)(2,"app-custom-paginator",26),t.NdJ("total",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.getRowCount())})("next",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onNextPage())})("previous",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onPreviousPage())}),t.qZA()()()}if(2&i){const n=t.oxw();t.xp6(2),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}k.\u0275fac=function(e){return new(e||k)(t.Y36(T.O),t.Y36(v._W),t.Y36(g.uw),t.Y36(M.M))},k.\u0275cmp=t.Xpm({type:k,selectors:[["app-in-pos"]],decls:26,vars:13,consts:[["description","All products which is already available in POS",3,"headerTitle","onSubmit"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-2",3,"click",4,"ngIf"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModel","ngModelChange","click"],["matEndDate","","placeholder","End date",3,"ngModel","ngModelChange","click"],["picker",""],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onScan","onDescEvent","onCheckBoxChange"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous"]],template:function(e,n){if(1&e){const o=t.EpF();t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(l){return n.searchProduct(l)}),t.TgZ(1,"actions"),t.YNc(2,ht,3,0,"button",1),t.YNc(3,ut,3,1,"button",2),t.YNc(4,gt,3,1,"button",3),t.qZA(),t.TgZ(5,"filters")(6,"div",4)(7,"div",5)(8,"div")(9,"h6"),t._uU(10,"Category "),t.qZA(),t.TgZ(11,"ng-select",6),t.NdJ("ngModelChange",function(l){return n.searchFilter.Category=l}),t.qZA()(),t.TgZ(12,"div")(13,"h6"),t._uU(14,"Release"),t.qZA(),t.TgZ(15,"mat-date-range-input",7)(16,"input",8),t.NdJ("ngModelChange",function(l){return n.startDate=l})("click",function(){t.CHM(o);const l=t.MAs(19);return t.KtG(l.open())}),t.qZA(),t.TgZ(17,"input",9),t.NdJ("ngModelChange",function(l){return n.endDate=l})("click",function(){t.CHM(o);const l=t.MAs(19);return t.KtG(l.open())}),t.qZA()(),t._UZ(18,"mat-date-range-picker",null,10),t.qZA()()()(),t.TgZ(20,"content")(21,"div",11)(22,"div",12),t.YNc(23,_t,2,10,"div",13),t.YNc(24,mt,3,0,"ng-container",14),t.qZA(),t.YNc(25,Ct,4,4,"ng-container",14),t.qZA()()()}if(2&e){const o=t.MAs(19);t.Q6J("headerTitle","In POS ("+n.rowCount+")"),t.xp6(2),t.Q6J("ngIf",!n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(7),t.Q6J("clearable",!0)("items",n.Categories)("ngModel",n.searchFilter.Category),t.xp6(4),t.Q6J("rangePicker",o),t.xp6(1),t.Q6J("ngModel",n.startDate),t.xp6(1),t.Q6J("ngModel",n.endDate),t.xp6(6),t.Q6J("ngForOf",n.products),t.xp6(1),t.Q6J("ngIf",0==n.products.length),t.xp6(1),t.Q6J("ngIf",n.products.length>0)}},dependencies:[d.sg,d.O5,h.Fj,h.JJ,h.On,P.p,f.w9,F.y,B.Y,b.s,A.wx,A.zY,A.By,A._g],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}"]});class U{constructor(e,n,o,a,l){this.http=e,this.dialog=n,this.toastr=o,this.productService=a,this.activateRouter=l,this.searchFilter=new E.k,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=s.g.GuidEMpty}ngOnInit(){this.activateRouter.queryParams.subscribe(e=>{this.initPageLoader(e.ID?e.ID:s.g.GuidEMpty)})}initPageLoader(e){this.productService.loader(e).subscribe(n=>{this.channelOptions=n.Options.Channel,this.searchFilter=n.Filter,n.Filter.ChannelID!=s.g.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(n.Filter.ChannelID)),this.searchFilter.PageSize=n.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}getProducts(){this.productService.findAllSoldInChannel({ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id}).subscribe(n=>{this.products=n.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(e){this.searchFilter.text=e,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(e){this.dialog.open(I,{data:{variants:this.products[e].Variants,title:this.products[e].Name},width:"800px"})}onOpenScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=s.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe((0,u.h)(o=>s.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scanAllProduct()})}scanAllProduct(){let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe((0,u.h)(n=>n)).subscribe(n=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(n,e,!this.searchFilter.UpdatedProduct),this.initPageLoader(s.g.GuidEMpty))})}onScanSingleProduct(e){e.Channel=this.productService.getChannelProduct(e);let n=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(_.j,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe((0,u.h)(o=>s.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID;const a=this.productService.getVariantCodesProduct(e);this.scanProducts(a)})}onUploadToMultipleChannel(e){let n=this.productService.getChannelProduct(e);e.Channel=n;let o=this.productService.filterUnselectedChannel([e],this.channelOptions);this.dialog.open(m,{width:"700px",data:{title:`Upload - ${e.Name}`,channels:o}}).afterClosed().pipe((0,u.h)(a=>"CANCEL"!==a),(0,x.w)(a=>this.productService.uploadSingleProduct([e],a))).subscribe({next:a=>{this.getProducts()}})}onScanMultipleProduct(){let e=this.productService.filterChannelByTypeId(this.channelOptions,[p.x.Tokopedia,p.x.Tiktok]);this.searchFilter.ChannelID=s.g.GuidEMpty;let n=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(_.j,{data:{filter:n,channelOptions:e,isSingleChannel:!0},width:"600px"}).afterClosed().pipe((0,u.h)(a=>s.g.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.UpdatedProduct=a.UpdatedProduct;let l=this.productService.selectedProduct(this.products),r=this.productService.getVariantCodesProducts(l);this.scanProducts(r)})}scanProducts(e){this.productService.scanSingle(this.searchFilter.ChannelID,e).subscribe({next:n=>{let o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);n?this.toastr.success(`Product Successfully scan with ${o?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${o?.Name} `,"Error"),this.searchFilter.ChannelID=s.g.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=s.g.GuidEMpty}})}getVariantCode(e){let n;return e.length>1&&(n=(e[0].model?e[0].model:"")+e[0].Code),1==e.length&&(n=e[0].Code),n}onClearFilterChannel(){this.searchFilter.ChannelID=s.g.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let e=this.productService.selectedProduct(this.products),n=this.productService.filterUnselectedChannel(e,this.channelOptions);this.dialog.open(m,{width:"700px",data:{title:"Upload Multiple Product",channels:n}}).afterClosed().pipe((0,u.h)(o=>"CANCEL"!==o),(0,x.w)(o=>this.productService.uploadMultipleProduct(e,o))).subscribe({next:o=>{this.getProducts()}})}getRowCount(){this.http.post("/api/product/GetSoldInChannelRowCount",{ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text}).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Total})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(e){return s.g.getChannelLogoByTypeId(e)}}U.\u0275fac=function(e){return new(e||U)(t.Y36(T.O),t.Y36(g.uw),t.Y36(v._W),t.Y36(M.M),t.Y36(S.gz))},U.\u0275cmp=t.Xpm({type:U,selectors:[["app-sold-in-channel"]],decls:20,vars:12,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"headerTitle","onSubmit"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-2",3,"click",4,"ngIf"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","multiple","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[4,"ngIf"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],["type","text","name","Item_id","id","Item_id",1,"form-control",3,"ngModel","ngModelChange"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onDescEvent","onScan","onCheckBoxChange"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(e,n){1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(a){return n.searchProduct(a)}),t.TgZ(1,"actions"),t.YNc(2,ft,3,0,"button",1),t.YNc(3,xt,3,1,"button",2),t.YNc(4,Pt,3,1,"button",3),t.qZA(),t.TgZ(5,"filters")(6,"div",4)(7,"div",5)(8,"div")(9,"h6"),t._uU(10,"Channel"),t.qZA(),t.TgZ(11,"ng-select",6),t.NdJ("ngModelChange",function(a){return n.searchFilter.ListChannelID=a})("clear",function(){return n.onClearFilterChannel()}),t.YNc(12,bt,3,2,"ng-template",7),t.qZA()(),t.YNc(13,St,4,1,"div",8),t.qZA()()(),t.TgZ(14,"content")(15,"div",9)(16,"div",10),t.YNc(17,It,2,10,"div",11),t.YNc(18,Tt,3,0,"ng-container",8),t.qZA(),t.YNc(19,yt,3,4,"div",12),t.qZA()()()),2&e&&(t.Q6J("headerTitle","Sold in Channel"),t.xp6(2),t.Q6J("ngIf",!n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(7),t.Q6J("clearable",!0)("multiple",!0)("items",n.channelOptions)("ngModel",n.searchFilter.ListChannelID),t.xp6(2),t.Q6J("ngIf",null!=n.searchFilter.ListChannelID),t.xp6(4),t.Q6J("ngForOf",n.products),t.xp6(1),t.Q6J("ngIf",0==n.products.length),t.xp6(1),t.Q6J("ngIf",null==n.products?null:n.products.length))},dependencies:[d.sg,d.O5,h.Fj,h.JJ,h.On,P.p,f.w9,f.ir,F.y,B.Y,b.s],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});var w=c(8063),vt=c(8505),Mt=c(4004),wt=c(9425),Zt=c(1739);function Ot(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",10),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(2);return t.KtG(a.uploadMultipleProduct())}),t._UZ(1,"i",11),t._uU(2),t.qZA()}if(2&i){const n=t.oxw(2);t.xp6(2),t.hij(" upload (",null==n.selectedProducts?null:n.selectedProducts.length,") ")}}function Nt(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"td",27)(2,"input",28),t.NdJ("ngModelChange",function(a){t.CHM(n);const l=t.oxw(2).$implicit;return t.KtG(l.selected=a)})("ngModelChange",function(){t.CHM(n);const a=t.oxw(3).ngIf,l=t.oxw(3);return t.KtG(l.onSelectProduct(a))}),t.qZA()(),t.BQk()}if(2&i){const n=t.oxw(2).$implicit;t.xp6(1),t.Q6J("rowSpan",null==n?null:n.Variants.length),t.xp6(1),t.Q6J("ngModel",n.selected)}}function Ft(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"img",34),t.NdJ("click",function(a){t.CHM(n);const l=t.oxw(3).$implicit,r=t.oxw(4);return t.KtG(r.onZoomImage(a,null==l?null:l.ImageUrl))}),t.qZA(),t.BQk()}if(2&i){const n=t.oxw(3).$implicit;t.xp6(1),t.Q6J("src",null==n?null:n.ImageUrl,t.LSH)}}function At(i,e){1&i&&t._UZ(0,"img",35)}function kt(i,e){if(1&i&&(t.ynx(0),t.TgZ(1,"td",27)(2,"div",29),t.YNc(3,Ft,2,1,"ng-container",7),t.YNc(4,At,1,0,"ng-template",null,30,t.W1O),t.qZA()(),t.TgZ(6,"td",31)(7,"h4",32)(8,"span",33),t._uU(9),t.qZA()()(),t.BQk()),2&i){const n=t.MAs(5),o=t.oxw(2).$implicit;t.xp6(1),t.Q6J("rowSpan",null==o?null:o.Variants.length),t.xp6(2),t.Q6J("ngIf",null==o?null:o.ImageUrl)("ngIfElse",n),t.xp6(3),t.Q6J("rowSpan",null==o?null:o.Variants.length),t.xp6(2),t.Q6J("matTooltip",(null==o||null==o.Name?null:o.Name.length)>50?null==o?null:o.Name:""),t.xp6(1),t.hij(" ",null==o?null:o.Name," ")}}function Ut(i,e){if(1&i&&(t.TgZ(0,"div")(1,"a",23),t._UZ(2,"img",36),t.qZA()()),2&i){const n=e.$implicit;t.xp6(1),t.Q6J("href",n.URL,t.LSH),t.xp6(1),t.Q6J("src",n.Img,t.LSH)("matTooltip",n.Name)}}function Dt(i,e){if(1&i&&(t.TgZ(0,"div"),t._UZ(1,"img",36),t.qZA()),2&i){const n=e.$implicit;t.xp6(1),t.Q6J("src",n.Img,t.LSH)("matTooltip",n.Name)}}function Jt(i,e){if(1&i&&(t.TgZ(0,"tr"),t.YNc(1,Nt,3,2,"ng-container",20),t.YNc(2,kt,10,6,"ng-container",20),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td")(6,"span"),t._uU(7),t.qZA(),t.TgZ(8,"span",22)(9,"a",23),t._UZ(10,"i",24),t.qZA()()(),t.TgZ(11,"td",25)(12,"div",26),t.YNc(13,Ut,3,3,"div",21),t.qZA()(),t.TgZ(14,"td",25)(15,"div",26),t.YNc(16,Dt,2,2,"div",21),t.qZA()()()),2&i){const n=e.$implicit,o=e.index,a=t.oxw(5);t.xp6(1),t.Q6J("ngIf",0==o),t.xp6(1),t.Q6J("ngIf",0==o),t.xp6(2),t.hij(" ",n.Name," "),t.xp6(3),t.hij(" ",n.Code," "),t.xp6(2),t.Q6J("href","https://"+a.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(null==n?null:n.ID),t.LSH),t.xp6(4),t.Q6J("ngForOf",null==n?null:n.Available),t.xp6(3),t.Q6J("ngForOf",null==n?null:n.NotAvailable)}}function Lt(i,e){if(1&i&&(t.ynx(0),t.YNc(1,Jt,17,7,"tr",21),t.BQk()),2&i){const n=e.$implicit;t.xp6(1),t.Q6J("ngForOf",n.Variants)}}function Qt(i,e){if(1&i&&(t.TgZ(0,"tbody"),t.YNc(1,Lt,2,1,"ng-container",21),t.qZA()),2&i){const n=e.ngIf;t.xp6(1),t.Q6J("ngForOf",n)}}function qt(i,e){if(1&i&&(t.ynx(0),t.TgZ(1,"div",12)(2,"table",13)(3,"thead",14)(4,"tr"),t._UZ(5,"th",15),t.TgZ(6,"th",16),t._uU(7,"Product"),t.qZA(),t.TgZ(8,"th",17),t._uU(9,"Variant"),t.qZA(),t.TgZ(10,"th",17),t._uU(11,"SKU"),t.qZA(),t.TgZ(12,"th",18),t._uU(13,"Available In"),t.qZA(),t.TgZ(14,"th",19),t._uU(15,"Not Available In"),t.qZA()()(),t.YNc(16,Qt,2,1,"tbody",20),t.ALo(17,"async"),t.qZA()(),t.BQk()),2&i){const n=t.oxw(2);t.xp6(16),t.Q6J("ngIf",t.lcZ(17,1,n.data$))}}function Et(i,e){1&i&&(t.TgZ(0,"div",37),t._UZ(1,"app-empty-state"),t.qZA())}function Yt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"span",45),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(3);return t.KtG(a.getRowCount())}),t.TgZ(1,"i",46),t._uU(2,"?"),t.qZA()()}}function Bt(i,e){if(1&i&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&i){const n=e.ngIf;t.xp6(1),t.Oqu(t.lcZ(2,1,null==n?null:n.Count))}}function Kt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"a",47),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(3);return t.KtG(a.onNextPage())}),t._UZ(1,"i",48),t._uU(2," Next"),t.qZA()}}function Vt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"a",49),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(3);return t.KtG(a.onLastPage())}),t._UZ(1,"i",50),t._uU(2," Last"),t.qZA()}}function Gt(i,e){if(1&i&&(t.TgZ(0,"div",38)(1,"div",39)(2,"div",40),t._uU(3),t.ALo(4,"number"),t.YNc(5,Yt,3,0,"span",41),t.YNc(6,Bt,3,3,"span",20),t.ALo(7,"async"),t._uU(8),t.qZA()(),t.TgZ(9,"div",42),t.YNc(10,Kt,3,0,"a",43),t.YNc(11,Vt,3,0,"a",44),t.qZA()()),2&i){const n=e.ngIf,o=t.oxw(2);t.xp6(3),t.hij(" Showing 1 - ",t.lcZ(4,6,null==n?null:n.length)," of "),t.xp6(2),t.Q6J("ngIf",o.paginationService.hideCount),t.xp6(1),t.Q6J("ngIf",!o.paginationService.hideCount&&t.lcZ(7,8,o.rowCount$)),t.xp6(2),t.hij(" records ~ ",o.paginationService.footerPageNumber," Page "),t.xp6(2),t.Q6J("ngIf",o.paginationService.disableNextButton&&!o.paginationService.goToLastPage),t.xp6(1),t.Q6J("ngIf",o.paginationService.disableNextButton&&!o.paginationService.goToLastPage)}}function $t(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"mainpanel",1),t.NdJ("onSubmit",function(a){t.CHM(n);const l=t.oxw();return t.KtG(l.searchProduct(a))}),t.TgZ(1,"actions"),t.YNc(2,Ot,3,1,"button",2),t.TgZ(3,"button",3),t.NdJ("click",function(){const l=t.CHM(n).ngIf,r=t.oxw();return t.KtG(r.openScanDialog(l))}),t._UZ(4,"i",4),t._uU(5," Scan Channel "),t.qZA()(),t.TgZ(6,"content")(7,"div",5)(8,"div",6),t.YNc(9,qt,18,3,"ng-container",7),t.ALo(10,"async"),t.YNc(11,Et,2,0,"ng-template",null,8,t.W1O),t.qZA(),t.YNc(13,Gt,12,10,"div",9),t.ALo(14,"async"),t.qZA()()()}if(2&i){const n=t.MAs(12),o=t.oxw();let a;t.Q6J("hideSearchDropdown",!0),t.xp6(2),t.Q6J("ngIf",o.hasSelectionProduct),t.xp6(7),t.Q6J("ngIf",(null==(a=t.lcZ(10,5,o.data$))?null:a.length)>0)("ngIfElse",n),t.xp6(4),t.Q6J("ngIf",t.lcZ(14,7,o.data$))}}class D{constructor(e,n,o,a,l,r){this.http=e,this.dialog=n,this.toastr=o,this.productService=a,this.paginationService=l,this.biggerPictureService=r,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[]}ngOnInit(){this.initPageLoader(),this.iniData(),this.initHostName()}initHostName(){const e=localStorage.getItem("Authorization");this.hostName=JSON.parse(e)?.Host}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe((0,vt.b)(e=>{this.filterSearch=e.Filter,this.paginationService.resetToFirstPage(e.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe((0,Mt.U)(e=>e.map(n=>(n.Variants=n.Variants.map(o=>(o.Available=this.productService.sortChannel(o.Available),o.NotAvailable=this.productService.sortChannel(o.NotAvailable),o.Available=this.assignLogoChannel(o.Available),o.NotAvailable=this.assignLogoChannel(o.NotAvailable),o)),n))))}assignLogoChannel(e){return e.map(n=>(n.Img=s.g.getChannelLogoByTypeId(n.TypeID),n))}searchProduct(e){this.filterSearch.text=e,this.paginationService.resetToFirstPage(this.filterSearch)}scanAllProduct(e){let n=this.productService.findChannelById(this.filterSearch.ChannelID,e.Options.Channel);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(o=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(o,n,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(e){let n=JSON.parse(JSON.stringify(this.filterSearch));n.ChannelID=s.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:n,channelOptions:e.Options.Channel},width:"600px"}).afterClosed().pipe((0,u.h)(a=>s.g.IsNotEmpty(a))).subscribe(a=>{this.filterSearch.ChannelID=a.ChannelID,this.filterSearch.ScanFull=a.ScanFull,this.filterSearch.UpdatedProduct=a.UpdatedProduct,this.filterSearch.Async=a.Async,this.scanAllProduct(e)})}getChannelLogoById(e){return s.g.getChannelLogoByTypeId(e)}getRowCount(){this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`/api/${this.rowCountAPI}`,this.filterSearch)}onNextPage(){this.paginationService.onNextPage(this.filterSearch)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:e=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,e.Count)}})}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}onSelectProduct(e){this.hasSelectionProduct=this.productService.hasSelection(e),this.selectedProducts=this.productService.selectedProduct(e)}uploadMultipleProduct(){let e=this.getUniqueChannels();e=e.map(n=>(n.ID=n.ChannelID,n)),this.dialog.open(m,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe((0,u.h)(n=>"CANCEL"!==n),(0,x.w)(n=>{const o=this.getSelectedProductIds();return this.productService.uploadNotInChannel(o,n)})).subscribe({next:()=>{this.paginationService.resetToFirstPage(this.filterSearch),this.selectedProducts=[],this.hasSelectionProduct=!1},error:n=>{this.selectedProducts=[],this.hasSelectionProduct=!1}})}getSelectedProductIds(){return this.selectedProducts.map(n=>({ID:n.ProductID}))}getUniqueChannels(){let e=[];return this.selectedProducts.forEach(n=>{e=[...e,...n.Variants[0].NotAvailable]}),e=e.filter((n,o,a)=>a.findIndex(l=>l.ChannelID==n.ChannelID)==o),e}ngOnDestroy(){this.paginationService.destroy()}}function Ht(i,e){if(1&i&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA()()),2&i){const n=e.$implicit;t.xp6(2),t.Oqu(null==n?null:n.Name),t.xp6(2),t.Oqu(null==n?null:n.ChannelVariationSKU)}}D.\u0275fac=function(e){return new(e||D)(t.Y36(T.O),t.Y36(g.uw),t.Y36(v._W),t.Y36(M.M),t.Y36(wt.b),t.Y36(Zt.k))},D.\u0275cmp=t.Xpm({type:D,selectors:[["app-not-in-channel"]],decls:2,vars:3,consts:[["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit",4,"ngIf"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"container-fluid","mt-3"],[1,"row"],[4,"ngIf","ngIfElse"],["EMPTY",""],["class","d-flex justify-content-between mt-5",4,"ngIf"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","10px"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModel","ngModelChange"],[2,"padding-right","0px"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(e,n){1&e&&(t.YNc(0,$t,15,9,"mainpanel",0),t.ALo(1,"async")),2&e&&t.Q6J("ngIf",t.lcZ(1,1,n.loader$))},dependencies:[d.sg,d.O5,h.Wl,h.JJ,h.On,P.p,N.gM,b.s,d.Ov,d.JJ],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]});class J{constructor(e,n){this.data=e,this.dialogRef=n}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new K.O,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0}}J.\u0275fac=function(e){return new(e||J)(t.Y36(g.WI),t.Y36(g.so))},J.\u0275cmp=t.Xpm({type:J,selectors:[["app-modal-variants"]],decls:11,vars:2,consts:[[3,"config","onCancel"],["content",""],[1,"table"],[1,"thead-light"],[4,"ngFor","ngForOf"]],template:function(e,n){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onCancel",function(){return n.dialogRef.close()}),t.TgZ(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th"),t._uU(6,"Variant"),t.qZA(),t.TgZ(7,"th"),t._uU(8,"SKU"),t.qZA()()(),t.TgZ(9,"tbody"),t.YNc(10,Ht,5,2,"tr",4),t.qZA()()()()),2&e&&(t.Q6J("config",n.modalConfig),t.xp6(10),t.Q6J("ngForOf",n.data.variants))},dependencies:[d.sg,V.M],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]});var G=c(1948);function Rt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",14),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.openScanDialog())}),t._UZ(1,"i",15),t._uU(2," Scan Channel "),t.qZA()}}function jt(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"button",16),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onDownloadAllProduct("SELECTED"))}),t._UZ(2,"i",17),t._uU(3),t.qZA(),t.BQk()}if(2&i){const n=t.oxw();let o;t.xp6(3),t.hij(" Download (",null==(o=n.productService.selectedProduct(n.products))?null:o.length,") ")}}function zt(i,e){if(1&i&&(t.TgZ(0,"span",18),t._UZ(1,"img",19),t.qZA(),t._uU(2)),2&i){const n=e.item,o=t.oxw();t.xp6(1),t.Q6J("src",o.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}const Wt=function(i){return[i]},Xt=function(){return[]};function tn(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",20)(1,"app-product-card",21),t.NdJ("onCheckBoxChange",function(a){const r=t.CHM(n).index,fn=t.oxw();return t.KtG(fn.onSelectProduct(a,r))})("onDescEvent",function(){const l=t.CHM(n).index,r=t.oxw();return t.KtG(r.onShowVariantDetail(l))})("onDownload",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onDownloadProduct(l))})("onScan",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onScanChannel(l))}),t.qZA()()}if(2&i){const n=e.$implicit;t.xp6(1),t.Q6J("showRedirectIcon",!1)("title",null==n?null:n.Name)("image",null==n?null:n.Image)("imageForZoom",null==n?null:n.Image)("code",null==n?null:n.SKU)("description",(null==n||null==n.Variant?null:n.Variant.length)>0?(null==n||null==n.Variant?null:n.Variant.length)+" Variants":null)("downloadButton",!0)("channels",null!=n&&n.Channel?t.VKq(10,Wt,null==n?null:n.Channel):t.DdM(12,Xt))("showCheckBox",!0)("scanButton",!0)}}function nn(i,e){1&i&&(t.ynx(0),t.TgZ(1,"div",22),t._UZ(2,"app-empty-state"),t.qZA(),t.BQk())}function en(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",23)(1,"div",24)(2,"app-custom-paginator",25),t.NdJ("total",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.getRowCount())})("next",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onNextPage())})("previous",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onPreviousPage())}),t.qZA()()()}if(2&i){const n=t.oxw();t.xp6(2),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}class L{constructor(e,n,o,a,l){this.http=e,this.dialog=n,this.productService=o,this.toastrService=a,this.activateRouter=l,this.searchFilter=new E.k,this.products=[],this.hasClickRowCount=!1}ngOnInit(){this.activateRouter.queryParams.subscribe(e=>{this.initPageLoader(e.ID?e.ID:s.g.GuidEMpty)})}initPageLoader(e){this.productService.loader(e).subscribe(n=>{this.channelOptions=n.Options.Channel,this.searchFilter=n.Filter,this.searchFilter.PageSize=n.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(e=>{this.products=e.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){this.products=this.products.map(e=>(e.Channel=JSON.parse(JSON.stringify(this.channelOptions.find(n=>n.ID==e.ChannelID))),e)).map(e=>(e.Channel.Url=e.Url,e))}setSkuProduct(){this.products=this.products.map(e=>(e.SKU=0==e?.Variant?.length?s.g.IsNotEmpty(e?.ChannelItemSKU)?e?.ChannelItemSKU:"SKU not assigned":e?.Variant[0]?.ChannelVariationSKU?e?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",e))}onSearch(e){this.searchFilter.text=e,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=s.g.GuidEMpty}onScanAll(){let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(n=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(s.g.GuidEMpty),this.productService.successToastrScanAllProduct(n,e,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=s.g.GuidEMpty})}openScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=s.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe((0,u.h)(o=>s.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.Async=o.Async,this.onScanAll()})}onDownloadAllProduct(e){let n;n="ALL"==e?this.products:this.productService.selectedProduct(this.products),n.length>0&&this.productService.downloadMultipleProduct(n).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(e,n){this.products[n].selected=e}onDownloadProduct(e){confirm(`Are you sure you want to Retrieve product ${e?.Name} from ${e?.Channel.Name} to POS?`)&&this.productService.downloadProduct(e).subscribe({next:()=>{this.getProducts()}})}onScanChannel(e){let n=JSON.parse(JSON.stringify(e));delete n.Channel,this.productService.scanCompareToPos([n]).subscribe(o=>{o.Status?(this.initPageLoader(s.g.GuidEMpty),this.toastrService.success(`product ${e.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${e.Name} is not existed in POS`,"Error")})}onShowVariantDetail(e){let n=this.products[e].Variant;n.length>0&&this.dialog.open(J,{data:{title:this.products[e].Name,variants:n},width:"30%"})}getRowCount(){let e={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",e).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Count})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(e){return s.g.getChannelLogoByTypeId(e)}}L.\u0275fac=function(e){return new(e||L)(t.Y36(T.O),t.Y36(g.uw),t.Y36(M.M),t.Y36(v._W),t.Y36(S.gz))},L.\u0275cmp=t.Xpm({type:L,selectors:[["app-not-in-pos"]],decls:32,vars:13,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit"],["type","button","data-cy","scanNotInPos","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],[4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],["name","haveSKU",1,"form-control","h-100","pt-3","rounded",3,"ngModel","ngModelChange"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton","onCheckBoxChange","onDescEvent","onDownload","onScan"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(e,n){1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(a){return n.onSearch(a)}),t.TgZ(1,"actions"),t.YNc(2,Rt,3,0,"button",1),t.YNc(3,jt,4,1,"ng-container",2),t.qZA(),t.TgZ(4,"filters")(5,"div",3)(6,"div",4)(7,"div")(8,"h6"),t._uU(9,"Channel"),t.qZA(),t.TgZ(10,"ng-select",5),t.NdJ("ngModelChange",function(a){return n.searchFilter.ChannelID=a})("clear",function(){return n.onClearChannelFilter()}),t.YNc(11,zt,3,2,"ng-template",6),t.qZA()(),t.TgZ(12,"div")(13,"h6"),t._uU(14,"SKU Assigned"),t.qZA(),t.TgZ(15,"mat-radio-group",7),t.NdJ("ngModelChange",function(a){return n.searchFilter.HaveSku=a}),t.TgZ(16,"mat-radio-button",8),t._uU(17," All "),t.qZA(),t.TgZ(18,"mat-radio-button",8),t._uU(19," Yes "),t.qZA(),t.TgZ(20,"mat-radio-button",8),t._uU(21," No "),t.qZA()()(),t.TgZ(22,"div")(23,"h6"),t._uU(24,"Item ID"),t.qZA(),t.TgZ(25,"input",9),t.NdJ("ngModelChange",function(a){return n.searchFilter.Item_id=a}),t.qZA()()()()(),t.TgZ(26,"content")(27,"div",10)(28,"div",11),t.YNc(29,tn,2,13,"div",12),t.YNc(30,nn,3,0,"ng-container",2),t.qZA(),t.YNc(31,en,3,4,"div",13),t.qZA()()()),2&e&&(t.xp6(2),t.Q6J("ngIf",!n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(7),t.Q6J("clearable",!0)("items",n.channelOptions)("ngModel",n.searchFilter.ChannelID),t.xp6(5),t.Q6J("ngModel",n.searchFilter.HaveSku),t.xp6(1),t.Q6J("value",0),t.xp6(2),t.Q6J("value",1),t.xp6(2),t.Q6J("value",2),t.xp6(5),t.Q6J("ngModel",n.searchFilter.Item_id),t.xp6(4),t.Q6J("ngForOf",n.products),t.xp6(1),t.Q6J("ngIf",0==n.products.length),t.xp6(1),t.Q6J("ngIf",(null==n.products?null:n.products.length)>0))},dependencies:[d.sg,d.O5,h.Fj,h.JJ,h.On,P.p,f.w9,f.ir,G.VQ,G.U0,F.y,B.Y,b.s],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]});var j=c(5631);function on(i,e){if(1&i&&(t.TgZ(0,"span",8),t._UZ(1,"img",9),t.qZA(),t._uU(2)),2&i){const n=e.item,o=t.oxw();t.xp6(1),t.Q6J("src",o.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}function an(i,e){if(1&i&&(t.TgZ(0,"div",10),t._UZ(1,"app-duplicate-product-card",11),t.qZA()),2&i){const n=e.$implicit;t.xp6(1),t.Q6J("imageForZoom",n.ImageUrl)("title",n.Name)("code",n.Code)("image",n.ThumbnailURL)("channels",n.Channel)}}function ln(i,e){1&i&&(t.ynx(0),t.TgZ(1,"div",12),t._UZ(2,"app-empty-state"),t.qZA(),t.BQk())}function rn(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",13)(2,"div",14)(3,"app-custom-paginator",15),t.NdJ("next",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onNextPage())})("previous",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onPrevPage())})("total",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.getRowCount())}),t.qZA()()(),t.BQk()}if(2&i){const n=t.oxw();t.xp6(3),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickedRowCount)}}class Q{constructor(e,n){this.httpService=e,this.productService=n,this.searchFilter=new E.k,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader()}getPageLoader(){this.productService.loader().subscribe(e=>{this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.channelOptions=e.Options.Channel,this.getProducts()})}getProducts(){this.httpService.post("/api/product/GetDuplicateInChannel",{ChannelID:this.searchFilter.ChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text}).subscribe(n=>{this.products=n.Data})}onSearch(e){this.searchFilter.text=e,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=s.g.GuidEMpty}getChannelLogo(e){return s.g.getChannelLogoByTypeId(e)}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getRowCount(){this.httpService.post("/api/product/GetDuplicateInChannelRowCount",{text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID}).subscribe(n=>{this.hasClickedRowCount=!0,this.rowCount=n.Total})}}Q.\u0275fac=function(e){return new(e||Q)(t.Y36(T.O),t.Y36(M.M))},Q.\u0275cmp=t.Xpm({type:Q,selectors:[["app-duplicate-sku"]],decls:14,vars:6,consts:[["headerTitle","Multiple Listed SKU","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"imageForZoom","title","code","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous","total"]],template:function(e,n){1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(a){return n.onSearch(a)}),t.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),t._uU(5,"Channel"),t.qZA(),t.TgZ(6,"ng-select",2),t.NdJ("ngModelChange",function(a){return n.searchFilter.ChannelID=a})("clear",function(){return n.onClearFilter()}),t.YNc(7,on,3,2,"ng-template",3),t.qZA()()()(),t.TgZ(8,"content")(9,"div",4)(10,"div",5),t.YNc(11,an,2,5,"div",6),t.YNc(12,ln,3,0,"ng-container",7),t.qZA(),t.YNc(13,rn,4,4,"ng-container",7),t.qZA()()()),2&e&&(t.xp6(6),t.Q6J("clearable",!0)("items",n.channelOptions)("ngModel",n.searchFilter.ChannelID),t.xp6(5),t.Q6J("ngForOf",n.products),t.xp6(1),t.Q6J("ngIf",0==(null==n.products?null:n.products.length)),t.xp6(1),t.Q6J("ngIf",(null==n.products?null:n.products.length)>0))},dependencies:[d.sg,d.O5,h.JJ,h.On,P.p,f.w9,f.ir,j._,F.y,b.s]});var cn=c(8739);function sn(i,e){if(1&i&&(t.ynx(0),t._uU(1),t.BQk()),2&i){const n=t.oxw().$implicit;t.xp6(1),t.hij(" ",n.Count," ")}}function dn(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"span",26),t.NdJ("click",function(){t.CHM(n);const a=t.oxw().$implicit,l=t.oxw(2);return t.KtG(l.getLiveProductCount(a.ID,a))}),t._UZ(1,"i",27),t.qZA()}}const pn=function(){return["/menu/products/status/sold-in-channel"]},z=function(i){return{ID:i}},hn=function(){return["/menu/products/status/not-in-pos"]};function un(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"tr")(1,"td"),t._UZ(2,"img",16),t.TgZ(3,"span",17),t._uU(4),t.qZA()(),t.TgZ(5,"td",18),t.YNc(6,sn,2,1,"ng-container",4),t.YNc(7,dn,2,0,"ng-template",null,19,t.W1O),t.qZA(),t.TgZ(9,"td",18)(10,"a",20),t._uU(11),t.ALo(12,"number"),t.qZA()(),t.TgZ(13,"td",18)(14,"a",20),t._uU(15),t.ALo(16,"number"),t.qZA()(),t.TgZ(17,"td"),t._uU(18),t.ALo(19,"date"),t.qZA(),t.TgZ(20,"td")(21,"div",21)(22,"button",22),t.NdJ("click",function(){const l=t.CHM(n).$implicit,r=t.oxw(2);return t.KtG(r.onScanChannel(l))}),t._UZ(23,"i",23),t._uU(24," Scan "),t.qZA(),t.TgZ(25,"button",24),t.NdJ("click",function(){const l=t.CHM(n).$implicit,r=t.oxw(2);return t.KtG(r.onClearCache(l.ID))}),t._UZ(26,"i",25),t._uU(27," Clear "),t.qZA()()()()}if(2&i){const n=e.$implicit,o=t.MAs(8),a=t.oxw(2);t.xp6(2),t.Q6J("src",a.getChannelLogo(n.TypeID),t.LSH),t.xp6(2),t.Oqu(n.Name),t.xp6(2),t.Q6J("ngIf",void 0!==n.Count)("ngIfElse",o),t.xp6(4),t.Q6J("routerLink",t.DdM(18,pn))("queryParams",t.VKq(19,z,n.ID)),t.xp6(1),t.hij(" ",t.lcZ(12,11,n.SoldInChannel)," "),t.xp6(3),t.Q6J("routerLink",t.DdM(21,hn))("queryParams",t.VKq(22,z,n.ID)),t.xp6(1),t.hij(" ",t.lcZ(16,13,n.NotInPOS)," "),t.xp6(3),t.hij("",n.LastSync?t.xi3(19,15,n.LastSync,"dd MMM yyyy HH:mm"):"-"," ")}}function gn(i,e){if(1&i&&(t.ynx(0),t.TgZ(1,"div",6)(2,"table",7)(3,"thead",8)(4,"tr",9)(5,"th"),t._uU(6,"Channel"),t.qZA(),t.TgZ(7,"th",10),t._uU(8,"Live Product"),t.qZA(),t.TgZ(9,"th",11),t._uU(10,"Sold In Channel"),t.qZA(),t.TgZ(11,"th",12),t._uU(12,"Product Not in POS"),t.qZA(),t.TgZ(13,"th",13),t._uU(14,"Last Sync"),t.qZA(),t._UZ(15,"th",14),t.qZA()(),t.TgZ(16,"tbody"),t.YNc(17,un,28,24,"tr",15),t.ALo(18,"async"),t.qZA()()(),t.BQk()),2&i){const n=t.oxw();let o;t.xp6(17),t.Q6J("ngForOf",null==(o=t.lcZ(18,1,n.channels$))?null:o.Data)}}function _n(i,e){1&i&&(t.TgZ(0,"div",28),t._UZ(1,"app-empty-state"),t.qZA())}class q{constructor(e,n,o){this.productService=e,this.toastr=n,this.dialog=o,this.destroy$=new R.x}ngOnInit(){this.setObsProductStatistic(),this.initPageLoader()}initPageLoader(){this.productService.loader().pipe((0,Y.R)(this.destroy$)).subscribe(e=>{this.channelOptions=e?.Options?.Channel})}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(e,n){this.productService.getTotalProductLive(e).pipe((0,Y.R)(this.destroy$)).subscribe(o=>{n.Count=o.Count})}onScanChannel(e){this.dialog.open(_.j,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:e.ID},disabledChannelOption:!0}}).afterClosed().pipe((0,u.h)(n=>s.g.IsNotEmpty(n))).subscribe(n=>{this.scanAllProduct(e.ID,n)})}scanAllProduct(e,n){let o=this.productService.findChannelById(e,this.channelOptions);this.productService.scanAll(n.ChannelID,n.ScanFull,n.UpdatedProduct,n.Async).pipe((0,u.h)(a=>a)).subscribe(a=>{n.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(a,o,!n.UpdatedProduct),this.initPageLoader(),this.setObsProductStatistic())})}onClearCache(e){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(e).pipe((0,Y.R)(this.destroy$)).subscribe(o=>{this.toastr.success("Successfully cleared cache","Success"),this.initPageLoader(),this.setObsProductStatistic()})}getChannelLogo(e){return s.g.getChannelLogoByTypeId(e)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}q.\u0275fac=function(e){return new(e||q)(t.Y36(M.M),t.Y36(v._W),t.Y36(g.uw))},q.\u0275cmp=t.Xpm({type:q,selectors:[["app-channel-statistic"]],decls:9,vars:6,consts:[["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY",""],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[4,"ngFor","ngForOf"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],["QUESTION",""],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(e,n){if(1&e&&(t.TgZ(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3),t.YNc(5,gn,19,3,"ng-container",4),t.ALo(6,"async"),t.YNc(7,_n,2,0,"ng-template",null,5,t.W1O),t.qZA()()()()()),2&e){const o=t.MAs(8);let a;t.Q6J("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(5),t.Q6J("ngIf",(null==(a=t.lcZ(6,4,n.channels$))||null==a.Data?null:a.Data.length)>0)("ngIfElse",o)}},dependencies:[d.sg,d.O5,P.p,N.gM,S.rH,b.s,d.Ov,d.JJ,d.uU]});var mn=c(3238);const Cn=[{component:O,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:k,canActivate:[w.a],data:{title:"Products in POS"}},{path:"sold-in-channel",component:U,canActivate:[w.a],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:D,canActivate:[w.a],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:L,canActivate:[w.a],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:Q,canActivate:[w.a],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:q,canActivate:[w.a],data:{title:"Channel Statistic"}}]}];class Z{}Z.\u0275fac=function(e){return new(e||Z)},Z.\u0275mod=t.oAB({type:Z}),Z.\u0275inj=t.cJS({imports:[d.ez,h.u5,P.R,N.AV,f.A0,cn.TU,G.Fk,H.Z,j._,F.y,B.Y,S.Bz.forChild(Cn),b.s,A.FA,mn.XK]})}}]);