marketplacepos 3.9.4 → 3.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{chunk-UYW3YL3H.js → chunk-223IHKLH.js} +1 -1
- package/Marketplace/chunk-24E4KX5X.js +1 -0
- package/Marketplace/{chunk-BZT72IIB.js → chunk-24FH5K25.js} +1 -1
- package/Marketplace/{chunk-3OMVIKHK.js → chunk-2FPWKSK6.js} +1 -1
- package/Marketplace/{chunk-OVSLUEIO.js → chunk-2VBEH64C.js} +1 -1
- package/Marketplace/{chunk-BFJBMKDS.js → chunk-3FP6R342.js} +1 -1
- package/Marketplace/{chunk-5F2YQ7XL.js → chunk-3WYTYS4I.js} +1 -1
- package/Marketplace/{chunk-DOMXTGO5.js → chunk-4X7WAYU2.js} +1 -1
- package/Marketplace/{chunk-7F4OMKVB.js → chunk-6EOCCEBR.js} +1 -1
- package/Marketplace/{chunk-5K7YSLKL.js → chunk-6JIO3MDW.js} +1 -1
- package/Marketplace/{chunk-J7N5VFE6.js → chunk-6P3BIWG5.js} +1 -1
- package/Marketplace/{chunk-LFB6AUP4.js → chunk-75ETOW5V.js} +1 -1
- package/Marketplace/{chunk-6O46WM77.js → chunk-7CFOLDEA.js} +1 -1
- package/Marketplace/{chunk-AOQBLGBU.js → chunk-7HNQOPUO.js} +1 -1
- package/Marketplace/{chunk-WMKNIYJG.js → chunk-7O7ZV66V.js} +1 -1
- package/Marketplace/{chunk-W6HDGIZB.js → chunk-A6ED3RSO.js} +1 -1
- package/Marketplace/{chunk-CFWKH54E.js → chunk-AN2CINQU.js} +1 -1
- package/Marketplace/{chunk-DR4WIP6T.js → chunk-AR5AIUY5.js} +1 -1
- package/Marketplace/{chunk-5YDKDDXQ.js → chunk-BCZIDBRQ.js} +2 -2
- package/Marketplace/{chunk-Z7PAAM54.js → chunk-BHYLQ3XF.js} +1 -1
- package/Marketplace/{chunk-M7ZLTUVL.js → chunk-CMAYHYOO.js} +1 -1
- package/Marketplace/{chunk-ZNIAYABL.js → chunk-D6V2KDUQ.js} +1 -1
- package/Marketplace/{chunk-L72SNBKA.js → chunk-DCYKOVAM.js} +1 -1
- package/Marketplace/{chunk-IIGTCNJI.js → chunk-DWNMRBOC.js} +1 -1
- package/Marketplace/{chunk-V74TRO5C.js → chunk-FYZEL73T.js} +1 -1
- package/Marketplace/{chunk-673XNROP.js → chunk-GD7CSSWB.js} +1 -1
- package/Marketplace/{chunk-WHZLZBWD.js → chunk-HAGHCF7F.js} +1 -1
- package/Marketplace/{chunk-QDC2JFGY.js → chunk-IWPOHMOJ.js} +1 -1
- package/Marketplace/{chunk-BPOHVA6C.js → chunk-J4BS5HHW.js} +1 -1
- package/Marketplace/{chunk-QVEJEIWR.js → chunk-J7DEYKP6.js} +1 -1
- package/Marketplace/{chunk-5XEX4Z6N.js → chunk-JBVB4OVI.js} +1 -1
- package/Marketplace/{chunk-WTNHPIXD.js → chunk-JLAIVCSP.js} +1 -1
- package/Marketplace/{chunk-AI77CZ3S.js → chunk-K7OHC2AW.js} +1 -1
- package/Marketplace/{chunk-3KO3N6JP.js → chunk-KFK76TSL.js} +1 -1
- package/Marketplace/{chunk-7F3GACIE.js → chunk-KLFNBFWY.js} +1 -1
- package/Marketplace/{chunk-CXQFJUAW.js → chunk-LQIHGVQQ.js} +1 -1
- package/Marketplace/{chunk-YAWRXDGC.js → chunk-PIHDABAW.js} +1 -1
- package/Marketplace/{chunk-44TEKK34.js → chunk-PNDM4FNI.js} +1 -1
- package/Marketplace/{chunk-TVKWMJ24.js → chunk-SG7ZTVRN.js} +1 -1
- package/Marketplace/{chunk-D4PUISDS.js → chunk-SPVU5YQJ.js} +1 -1
- package/Marketplace/{chunk-IL3R7THF.js → chunk-T5LEJVUT.js} +1 -1
- package/Marketplace/{chunk-RISMLJLZ.js → chunk-TA2OMI4I.js} +1 -1
- package/Marketplace/{chunk-NFHX3EWZ.js → chunk-TPZUQ3VA.js} +1 -1
- package/Marketplace/{chunk-SMF6UCR5.js → chunk-TQJUXGLM.js} +1 -1
- package/Marketplace/{chunk-MICIQBL4.js → chunk-TUNUG7JP.js} +1 -1
- package/Marketplace/{chunk-VTLJVEYF.js → chunk-TXDNQ6BP.js} +1 -1
- package/Marketplace/{chunk-DG2DUPHG.js → chunk-U3XVBY4L.js} +1 -1
- package/Marketplace/{chunk-XBCSTQJ3.js → chunk-USTXSCDN.js} +1 -1
- package/Marketplace/{chunk-GVJVVJCU.js → chunk-UT3B5YJG.js} +1 -1
- package/Marketplace/{chunk-MWOXQU66.js → chunk-V2ASIO3I.js} +1 -1
- package/Marketplace/{chunk-W2SKBEUZ.js → chunk-V5N4EKHO.js} +1 -1
- package/Marketplace/{chunk-35SISJKC.js → chunk-VBDYQMXW.js} +1 -1
- package/Marketplace/{chunk-ZKY4MRMH.js → chunk-VGSJMM76.js} +1 -1
- package/Marketplace/{chunk-ZIANW63Q.js → chunk-VM6WJ77V.js} +1 -1
- package/Marketplace/{chunk-VVTMP7TD.js → chunk-VSHN3JTN.js} +1 -1
- package/Marketplace/{chunk-NA7DMV7H.js → chunk-VTBELDVB.js} +1 -1
- package/Marketplace/chunk-WBV2UEPL.js +1 -0
- package/Marketplace/{chunk-O6PGRAJA.js → chunk-WKCOG4BN.js} +1 -1
- package/Marketplace/{chunk-MUDZXRNT.js → chunk-XRNBSITS.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-5EL5X5GA.js → main-KGKJNXZE.js} +1 -1
- package/Marketplace/{styles-HLURZDLQ.css → styles-6PSCDOW2.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-4VWZIBEC.js +0 -1
- package/Marketplace/chunk-EEKM3HHQ.js +0 -1
- /package/Marketplace/{chunk-Y4MB3DWC.js → chunk-AFZN3DRI.js} +0 -0
- /package/Marketplace/{chunk-T2YIFX3Q.js → chunk-SLQJFLQ4.js} +0 -0
- /package/Marketplace/{chunk-KOJSHFZJ.js → chunk-SVMOHTLO.js} +0 -0
- /package/Marketplace/{chunk-WJGIBFHG.js → chunk-WGOJPXER.js} +0 -0
- /package/Marketplace/{polyfills-25D6JJC3.js → polyfills-FTWUMK2G.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{J as C,W as g,X as Q}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-OVSLUEIO.js";import{a as X}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-VTLJVEYF.js";import{$a as l,Ba as M,Fa as k,Ga as d,Ia as L,Ib as u,Ja as y,Jb as x,Ka as O,Lb as p,Ma as S,Na as F,Oa as s,Qa as b,Ra as j,Tb as m,Ub as U,Z as A,Za as a,_a as r,aa as f,ba as E,ea as I,eb as P,fa as v,hb as _,kb as q,la as z,lb as N,ma as w,oa as R,ob as V,tb as B,va as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-ZIANW63Q.js";var Y=["input"],$=["label"],J=["*"],W=new E("mat-checkbox-default-options",{providedIn:"root",factory:Z});function Z(){return{color:"accent",clickAction:"check-indeterminate"}}var ee={provide:X,useExisting:A(()=>oe),multi:!0},T=class{},ce=0,H=Z(),oe=(()=>{let t=class t{focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(e){let o=new T;return o.source=this,o.checked=e,o}_getAnimationTargetElement(){return this._inputElement?.nativeElement}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(e,o,c,i,h,G){this._elementRef=e,this._changeDetectorRef=o,this._ngZone=c,this._animationMode=h,this._options=G,this._animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"},this.ariaLabel="",this.ariaLabelledby=null,this.labelPosition="after",this.name=null,this.change=new y,this.indeterminateChange=new y,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=0,this._controlValueAccessorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||H,this.color=this._options.color||H.color,this.tabIndex=parseInt(i)||0,this.id=this._uniqueId=`mat-mdc-checkbox-${++ce}`}ngAfterViewInit(){this._syncIndeterminate(this._indeterminate)}get checked(){return this._checked}set checked(e){e!=this.checked&&(this._checked=e,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(e){e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(e){let o=e!=this._indeterminate;this._indeterminate=e,o&&(this._indeterminate?this._transitionCheckState(3):this._transitionCheckState(this.checked?1:2),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(e){this.checked=!!e}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_transitionCheckState(e){let o=this._currentCheckState,c=this._getAnimationTargetElement();if(!(o===e||!c)&&(this._currentAnimationClass&&c.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(o,e),this._currentCheckState=e,this._currentAnimationClass.length>0)){c.classList.add(this._currentAnimationClass);let i=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{c.classList.remove(i)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){let e=this._options?.clickAction;!this.disabled&&e!=="noop"?(this.indeterminate&&e!=="check"&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this._checked=!this._checked,this._transitionCheckState(this._checked?1:2),this._emitChangeEvent()):!this.disabled&&e==="noop"&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate)}_onInteractionEvent(e){e.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(e,o){if(this._animationMode==="NoopAnimations")return"";switch(e){case 0:if(o===1)return this._animationClasses.uncheckedToChecked;if(o==3)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case 2:return o===1?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case 1:return o===2?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case 3:return o===1?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(e){let o=this._inputElement;o&&(o.nativeElement.indeterminate=e)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(e){e.target&&this._labelElement.nativeElement.contains(e.target)&&e.stopPropagation()}};t.\u0275fac=function(o){return new(o||t)(d(M),d(L),d(O),R("tabindex"),d(D,8),d(W,8))},t.\u0275cmp=I({type:t,selectors:[["mat-checkbox"]],viewQuery:function(o,c){if(o&1&&(x(Y,5),x($,5),x(g,5)),o&2){let i;u(i=p())&&(c._inputElement=i.first),u(i=p())&&(c._labelElement=i.first),u(i=p())&&(c.ripple=i.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:14,hostBindings:function(o,c){o&2&&(P("id",c.id),F("tabindex",null)("aria-label",null)("aria-labelledby",null),j(c.color?"mat-"+c.color:"mat-accent"),b("_mat-animation-noopable",c._animationMode==="NoopAnimations")("mdc-checkbox--disabled",c.disabled)("mat-mdc-checkbox-disabled",c.disabled)("mat-mdc-checkbox-checked",c.checked))},inputs:{ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],id:"id",required:["required","required",m],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:["disableRipple","disableRipple",m],tabIndex:["tabIndex","tabIndex",e=>e==null?void 0:U(e)],color:"color",checked:["checked","checked",m],disabled:["disabled","disabled",m],indeterminate:["indeterminate","indeterminate",m]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[B([ee]),S],ngContentSelectors:J,decls:15,vars:20,consts:[[1,"mdc-form-field",3,"click"],[1,"mdc-checkbox"],["checkbox",""],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"checked","indeterminate","disabled","id","required","tabIndex","blur","click","change"],["input",""],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"],["label",""]],template:function(o,c){if(o&1&&(q(),a(0,"div",0),_("click",function(h){return c._preventBubblingFromLabel(h)}),a(1,"div",1,2)(3,"div",3),_("click",function(){return c._onTouchTargetClick()}),r(),a(4,"input",4,5),_("blur",function(){return c._onBlur()})("click",function(){return c._onInputClick()})("change",function(h){return c._onInteractionEvent(h)}),r(),l(6,"div",6),a(7,"div",7),z(),a(8,"svg",8),l(9,"path",9),r(),w(),l(10,"div",10),r(),l(11,"div",11),r(),a(12,"label",12,13),N(14),r()()),o&2){let i=V(2);b("mdc-form-field--align-end",c.labelPosition=="before"),k(4),b("mdc-checkbox--selected",c.checked),s("checked",c.checked)("indeterminate",c.indeterminate)("disabled",c.disabled)("id",c.inputId)("required",c.required)("tabIndex",c.disabled?-1:c.tabIndex),F("aria-label",c.ariaLabel||null)("aria-labelledby",c.ariaLabelledby)("aria-describedby",c.ariaDescribedby)("aria-checked",c.indeterminate?"mixed":null)("name",c.name)("value",c.value),k(7),s("matRippleTrigger",i)("matRippleDisabled",c.disableRipple||c.disabled)("matRippleCentered",!0),k(1),s("for",c.inputId)}},dependencies:[g],styles:['.mdc-touch-target-wrapper{display:inline}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}.mdc-checkbox[hidden]{display:none}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{border-color:CanvasText}}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{border-color:CanvasText}}@media all and (-ms-high-contrast: none){.mdc-checkbox .mdc-checkbox__focus-ring{display:none}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);right:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);left:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);width:var(--mdc-checkbox-state-layer-size);height:var(--mdc-checkbox-state-layer-size)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}.mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mdc-checkbox{padding:calc((var(--mdc-checkbox-state-layer-size) - 18px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2)}.mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color);background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:var(--mdc-checkbox-disabled-selected-icon-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-icon-color);background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}@keyframes mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336{0%{border-color:var(--mdc-checkbox-unselected-icon-color);background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}}@keyframes mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336{0%,80%{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}100%{border-color:var(--mdc-checkbox-unselected-icon-color);background-color:transparent}}.mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:transparent}.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}@keyframes mdc-checkbox-fade-in-background-FF212121FFF4433600000000FFF44336{0%{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}}@keyframes mdc-checkbox-fade-out-background-FF212121FFF4433600000000FFF44336{0%,80%{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}100%{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:transparent}}.mdc-checkbox:hover.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:hover.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-FF212121FFF4433600000000FFF44336}.mdc-checkbox:hover.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:hover.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-FF212121FFF4433600000000FFF44336}.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-pressed-icon-color);background-color:transparent}.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-pressed-icon-color);background-color:var(--mdc-checkbox-selected-pressed-icon-color)}@keyframes mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336{0%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color);background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-pressed-icon-color);background-color:var(--mdc-checkbox-selected-pressed-icon-color)}}@keyframes mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336{0%,80%{border-color:var(--mdc-checkbox-selected-pressed-icon-color);background-color:var(--mdc-checkbox-selected-pressed-icon-color)}100%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color);background-color:transparent}}.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox .mdc-checkbox__background{top:calc((var(--mdc-checkbox-state-layer-size) - 18px) / 2);left:calc((var(--mdc-checkbox-state-layer-size) - 18px) / 2)}.mdc-checkbox .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);right:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);left:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);width:var(--mdc-checkbox-state-layer-size);height:var(--mdc-checkbox-state-layer-size)}.mdc-checkbox .mdc-checkbox__native-control:enabled:focus:focus:not(:checked):not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled:focus:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:focus:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color);background-color:var(--mdc-checkbox-selected-focus-icon-color)}.mdc-checkbox:hover .mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-hover-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-hover-state-layer-color)}.mdc-checkbox:hover .mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-focus-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-focus-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-focus-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-pressed-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-hover-state-layer-opacity);background-color:var(--mdc-checkbox-selected-hover-state-layer-color)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-hover-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-focus-state-layer-opacity);background-color:var(--mdc-checkbox-selected-focus-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-focus-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-pressed-state-layer-opacity);background-color:var(--mdc-checkbox-selected-pressed-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-pressed-state-layer-color)}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox .mdc-checkbox__background{-webkit-print-color-adjust:exact;color-adjust:exact}.mat-mdc-checkbox._mat-animation-noopable *,.mat-mdc-checkbox._mat-animation-noopable *::before{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default}.mat-mdc-checkbox label:empty{display:none}.cdk-high-contrast-active .mat-mdc-checkbox.mat-mdc-checkbox-disabled{opacity:.5}.cdk-high-contrast-active .mat-mdc-checkbox .mdc-checkbox__checkmark{--mdc-checkbox-selected-checkmark-color: CanvasText;--mdc-checkbox-disabled-selected-checkmark-color: CanvasText}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-ripple .mat-ripple-element{opacity:.1}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0});let n=t;return n})();var K=(()=>{let t=class t{};t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=v({type:t}),t.\u0275inj=f({});let n=t;return n})(),Te=(()=>{let t=class t{};t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=v({type:t}),t.\u0275inj=f({imports:[C,Q,K,C,K]});let n=t;return n})();export{oe as a,Te as b};
|
|
1
|
+
import{J as C,W as g,X as Q}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-2VBEH64C.js";import{a as X}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-TXDNQ6BP.js";import{$a as l,Ba as M,Fa as k,Ga as d,Ia as L,Ib as u,Ja as y,Jb as x,Ka as O,Lb as p,Ma as S,Na as F,Oa as s,Qa as b,Ra as j,Tb as m,Ub as U,Z as A,Za as a,_a as r,aa as f,ba as E,ea as I,eb as P,fa as v,hb as _,kb as q,la as z,lb as N,ma as w,oa as R,ob as V,tb as B,va as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-VM6WJ77V.js";var Y=["input"],$=["label"],J=["*"],W=new E("mat-checkbox-default-options",{providedIn:"root",factory:Z});function Z(){return{color:"accent",clickAction:"check-indeterminate"}}var ee={provide:X,useExisting:A(()=>oe),multi:!0},T=class{},ce=0,H=Z(),oe=(()=>{let t=class t{focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(e){let o=new T;return o.source=this,o.checked=e,o}_getAnimationTargetElement(){return this._inputElement?.nativeElement}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(e,o,c,i,h,G){this._elementRef=e,this._changeDetectorRef=o,this._ngZone=c,this._animationMode=h,this._options=G,this._animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"},this.ariaLabel="",this.ariaLabelledby=null,this.labelPosition="after",this.name=null,this.change=new y,this.indeterminateChange=new y,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=0,this._controlValueAccessorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||H,this.color=this._options.color||H.color,this.tabIndex=parseInt(i)||0,this.id=this._uniqueId=`mat-mdc-checkbox-${++ce}`}ngAfterViewInit(){this._syncIndeterminate(this._indeterminate)}get checked(){return this._checked}set checked(e){e!=this.checked&&(this._checked=e,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(e){e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(e){let o=e!=this._indeterminate;this._indeterminate=e,o&&(this._indeterminate?this._transitionCheckState(3):this._transitionCheckState(this.checked?1:2),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(e){this.checked=!!e}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_transitionCheckState(e){let o=this._currentCheckState,c=this._getAnimationTargetElement();if(!(o===e||!c)&&(this._currentAnimationClass&&c.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(o,e),this._currentCheckState=e,this._currentAnimationClass.length>0)){c.classList.add(this._currentAnimationClass);let i=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{c.classList.remove(i)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){let e=this._options?.clickAction;!this.disabled&&e!=="noop"?(this.indeterminate&&e!=="check"&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this._checked=!this._checked,this._transitionCheckState(this._checked?1:2),this._emitChangeEvent()):!this.disabled&&e==="noop"&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate)}_onInteractionEvent(e){e.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(e,o){if(this._animationMode==="NoopAnimations")return"";switch(e){case 0:if(o===1)return this._animationClasses.uncheckedToChecked;if(o==3)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case 2:return o===1?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case 1:return o===2?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case 3:return o===1?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(e){let o=this._inputElement;o&&(o.nativeElement.indeterminate=e)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(e){e.target&&this._labelElement.nativeElement.contains(e.target)&&e.stopPropagation()}};t.\u0275fac=function(o){return new(o||t)(d(M),d(L),d(O),R("tabindex"),d(D,8),d(W,8))},t.\u0275cmp=I({type:t,selectors:[["mat-checkbox"]],viewQuery:function(o,c){if(o&1&&(x(Y,5),x($,5),x(g,5)),o&2){let i;u(i=p())&&(c._inputElement=i.first),u(i=p())&&(c._labelElement=i.first),u(i=p())&&(c.ripple=i.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:14,hostBindings:function(o,c){o&2&&(P("id",c.id),F("tabindex",null)("aria-label",null)("aria-labelledby",null),j(c.color?"mat-"+c.color:"mat-accent"),b("_mat-animation-noopable",c._animationMode==="NoopAnimations")("mdc-checkbox--disabled",c.disabled)("mat-mdc-checkbox-disabled",c.disabled)("mat-mdc-checkbox-checked",c.checked))},inputs:{ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],id:"id",required:["required","required",m],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:["disableRipple","disableRipple",m],tabIndex:["tabIndex","tabIndex",e=>e==null?void 0:U(e)],color:"color",checked:["checked","checked",m],disabled:["disabled","disabled",m],indeterminate:["indeterminate","indeterminate",m]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[B([ee]),S],ngContentSelectors:J,decls:15,vars:20,consts:[[1,"mdc-form-field",3,"click"],[1,"mdc-checkbox"],["checkbox",""],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"checked","indeterminate","disabled","id","required","tabIndex","blur","click","change"],["input",""],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"],["label",""]],template:function(o,c){if(o&1&&(q(),a(0,"div",0),_("click",function(h){return c._preventBubblingFromLabel(h)}),a(1,"div",1,2)(3,"div",3),_("click",function(){return c._onTouchTargetClick()}),r(),a(4,"input",4,5),_("blur",function(){return c._onBlur()})("click",function(){return c._onInputClick()})("change",function(h){return c._onInteractionEvent(h)}),r(),l(6,"div",6),a(7,"div",7),z(),a(8,"svg",8),l(9,"path",9),r(),w(),l(10,"div",10),r(),l(11,"div",11),r(),a(12,"label",12,13),N(14),r()()),o&2){let i=V(2);b("mdc-form-field--align-end",c.labelPosition=="before"),k(4),b("mdc-checkbox--selected",c.checked),s("checked",c.checked)("indeterminate",c.indeterminate)("disabled",c.disabled)("id",c.inputId)("required",c.required)("tabIndex",c.disabled?-1:c.tabIndex),F("aria-label",c.ariaLabel||null)("aria-labelledby",c.ariaLabelledby)("aria-describedby",c.ariaDescribedby)("aria-checked",c.indeterminate?"mixed":null)("name",c.name)("value",c.value),k(7),s("matRippleTrigger",i)("matRippleDisabled",c.disableRipple||c.disabled)("matRippleCentered",!0),k(1),s("for",c.inputId)}},dependencies:[g],styles:['.mdc-touch-target-wrapper{display:inline}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}.mdc-checkbox[hidden]{display:none}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{border-color:CanvasText}}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{border-color:CanvasText}}@media all and (-ms-high-contrast: none){.mdc-checkbox .mdc-checkbox__focus-ring{display:none}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);right:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);left:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);width:var(--mdc-checkbox-state-layer-size);height:var(--mdc-checkbox-state-layer-size)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}.mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mdc-checkbox{padding:calc((var(--mdc-checkbox-state-layer-size) - 18px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2)}.mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color);background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:var(--mdc-checkbox-disabled-selected-icon-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-icon-color);background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}@keyframes mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336{0%{border-color:var(--mdc-checkbox-unselected-icon-color);background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}}@keyframes mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336{0%,80%{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}100%{border-color:var(--mdc-checkbox-unselected-icon-color);background-color:transparent}}.mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:transparent}.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}@keyframes mdc-checkbox-fade-in-background-FF212121FFF4433600000000FFF44336{0%{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}}@keyframes mdc-checkbox-fade-out-background-FF212121FFF4433600000000FFF44336{0%,80%{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}100%{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:transparent}}.mdc-checkbox:hover.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:hover.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-FF212121FFF4433600000000FFF44336}.mdc-checkbox:hover.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:hover.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-FF212121FFF4433600000000FFF44336}.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-pressed-icon-color);background-color:transparent}.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-pressed-icon-color);background-color:var(--mdc-checkbox-selected-pressed-icon-color)}@keyframes mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336{0%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color);background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-pressed-icon-color);background-color:var(--mdc-checkbox-selected-pressed-icon-color)}}@keyframes mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336{0%,80%{border-color:var(--mdc-checkbox-selected-pressed-icon-color);background-color:var(--mdc-checkbox-selected-pressed-icon-color)}100%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color);background-color:transparent}}.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox .mdc-checkbox__background{top:calc((var(--mdc-checkbox-state-layer-size) - 18px) / 2);left:calc((var(--mdc-checkbox-state-layer-size) - 18px) / 2)}.mdc-checkbox .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);right:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);left:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);width:var(--mdc-checkbox-state-layer-size);height:var(--mdc-checkbox-state-layer-size)}.mdc-checkbox .mdc-checkbox__native-control:enabled:focus:focus:not(:checked):not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled:focus:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:focus:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color);background-color:var(--mdc-checkbox-selected-focus-icon-color)}.mdc-checkbox:hover .mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-hover-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-hover-state-layer-color)}.mdc-checkbox:hover .mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-focus-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-focus-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-focus-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-pressed-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-hover-state-layer-opacity);background-color:var(--mdc-checkbox-selected-hover-state-layer-color)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-hover-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-focus-state-layer-opacity);background-color:var(--mdc-checkbox-selected-focus-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-focus-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-pressed-state-layer-opacity);background-color:var(--mdc-checkbox-selected-pressed-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-pressed-state-layer-color)}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox .mdc-checkbox__background{-webkit-print-color-adjust:exact;color-adjust:exact}.mat-mdc-checkbox._mat-animation-noopable *,.mat-mdc-checkbox._mat-animation-noopable *::before{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default}.mat-mdc-checkbox label:empty{display:none}.cdk-high-contrast-active .mat-mdc-checkbox.mat-mdc-checkbox-disabled{opacity:.5}.cdk-high-contrast-active .mat-mdc-checkbox .mdc-checkbox__checkmark{--mdc-checkbox-selected-checkmark-color: CanvasText;--mdc-checkbox-disabled-selected-checkmark-color: CanvasText}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-ripple .mat-ripple-element{opacity:.1}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0});let n=t;return n})();var K=(()=>{let t=class t{};t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=v({type:t}),t.\u0275inj=f({});let n=t;return n})(),Te=(()=>{let t=class t{};t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=v({type:t}),t.\u0275inj=f({imports:[C,Q,K,C,K]});let n=t;return n})();export{oe as a,Te as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-7HNQOPUO.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-SVMOHTLO.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _t,c as q,d as te}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-GVJVVJCU.js";import{a as Z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-Y4MB3DWC.js";import{a as A}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-BFJBMKDS.js";import{d as Zt,e as qt,f as Yt,g as Qt,k as Wt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-5K7YSLKL.js";import{a as Y,b as gt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-O6PGRAJA.js";import{a as K}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-44TEKK34.js";import{b as ee}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-YAWRXDGC.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-CXQFJUAW.js";import{a as Xt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-LFB6AUP4.js";import{a as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-IIGTCNJI.js";import{a as U}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-XBCSTQJ3.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-7F3GACIE.js";import{a as jt,b as Gt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-CFWKH54E.js";import{f as k}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-5YDKDDXQ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-D4PUISDS.js";import{b as R,e as B}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-V74TRO5C.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-AOQBLGBU.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-WMKNIYJG.js";import{a as Ht}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-L72SNBKA.js";import{a as Kt,b as Jt,c as zt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-BPOHVA6C.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-6O46WM77.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-NFHX3EWZ.js";import{a as nt,c as H,d as Lt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-3KO3N6JP.js";import{a as W}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-35SISJKC.js";import{B as V,C as $t,q as ht,r as Bt,u as G}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-DR4WIP6T.js";import{T as Rt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-OVSLUEIO.js";import{b as Ut,c as et,h as $,k as j,u as At}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-VTLJVEYF.js";import{b as z,c as _}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-T2YIFX3Q.js";import{$a as C,$b as E,B as y,Db as F,Eb as T,Fa as c,Fb as Tt,Ga as x,Hc as mt,Ic as kt,Kc as ut,Mb as tt,Mc as Vt,Oa as s,T as J,Ua as S,V as Pt,X as Ot,Za as a,_a as l,_b as N,aa as Ft,ab as v,bb as b,c as wt,cc as pt,db as P,dc as Nt,ea as M,fa as Dt,fc as dt,gc as Et,hb as g,ja as u,jb as d,ka as h,ob as L,pb as m,q as Mt,qb as st,rb as I,vb as Q,wb as it,za as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-ZIANW63Q.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-KOJSHFZJ.js";var de=()=>["/menu/products/download/by-url"],ne=(()=>{let r=class r{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 Listing",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"}]}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=M({type:r,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,i){e&1&&(a(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),l()(),a(4,"div")(5,"div",3)(6,"a",4),C(7,"i",5),l(),a(8,"div",6)(9,"div",7)(10,"a",8),m(11,"Download Product By Url"),l()()()()()(),C(12,"router-outlet")),e&2&&(c(3),s("Tabs",i.productTabs),c(7),s("routerLink",Q(2,de)))},dependencies:[jt,kt,ut]});let o=r;return o})();function me(o,r){if(o&1){let n=P();a(0,"button",13),g("click",function(){u(n);let e=d(2);return h(e.onOpenScanDialog())}),C(1,"i",14),m(2," Scan Channel "),l()}}function ue(o,r){if(o&1&&(v(0),S(1,me,3,0,"button",12),b()),o&2){let n=d();c(1),s("ngIf",!n.productService.hasSelection(n.products))}}function he(o,r){if(o&1){let n=P();v(0),a(1,"button",15),g("click",function(){u(n);let e=d();return h(e.onScanMultipleProduct())}),C(2,"i",14),m(3),l(),b()}if(o&2){let n=d(),t;c(3),I(" Scan (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function _e(o,r){if(o&1){let n=P();v(0),a(1,"button",16),g("click",function(){u(n);let e=d();return h(e.onUploadMultipleProduct())}),C(2,"i",17),m(3),l(),b()}if(o&2){let n=d(),t;c(3),I(" Upload (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function ge(o,r){if(o&1){let n=P();a(0,"div",18)(1,"app-product-card",19),g("onUpload",function(){let i=u(n).$implicit,p=d();return h(p.onUploadToMultipleChannel(i))})("onScan",function(){let i=u(n).$implicit,p=d();return h(p.onScanSingleProduct(i))})("onDescEvent",function(){let i=u(n).index,p=d();return h(p.onOpenDialogVariant(i))})("onCheckBoxChange",function(e){let p=u(n).$implicit;return h(p.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=d();c(1),s("productId",n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null?null:n.Variants.length)>1?(n==null?null:n.Variants.length)+" Variants":null)("channels",t.productService.getChannelProduct(n))("code",t.getVariantCode(n==null?null:n.Variants))("showCheckBox",(n==null?null:n.Channel.length)<t.channelOptions.length)("scanButton",!0)("uploadButton",n==null?null:n.hasUpload)("imageForZoom",n==null?null:n.ImageUrl)}}function Ce(o,r){o&1&&(v(0),a(1,"div",20),C(2,"app-empty-state"),l(),b())}function fe(o,r){if(o&1){let n=P();v(0),a(1,"div",21)(2,"div",22)(3,"app-custom-paginator",23),g("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPrevPage())}),l()()(),b()}if(o&2){let n=d();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",!0)}}var oe=(()=>{let r=class r{constructor(t,e,i,p,f){this.http=t,this.toastr=e,this.dialog=i,this.productService=p,this.authService=f,this.searchFilter=new Z,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.getLoaderPage(),this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(t=>{this.Categories=t.Options.Categories,this.searchFilter.PageNumber=t.Filter.PageNumber,this.searchFilter.RowCount=t.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=t.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[z.Tokopedia,z.Tiktok])}getProducts(){let t={PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate};this.http.post("/api/product/GetInPOS",t).subscribe(e=>{this.products=e.Data,this.rowCount=e.Total==null?this.searchFilter.RowCount:e.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter.ChannelID==null){this.toastr.error("Please Select Channel","Error");return}this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{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 e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,e,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(t){this.dialog.open(_t,{data:{title:this.products[t].Name,variants:this.products[t].Variants},width:"800px"})}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products),e=this.productService.filterUnselectedChannel(t,this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe(y(i=>_.IsNotEmpty(i)),J(i=>this.productService.uploadMultipleProduct(t,i))).subscribe({next:i=>{this.getProducts()}})}onUploadToMultipleChannel(t){let e=this.productService.getChannelProduct(t);t.Channel=e;let i=this.productService.filterUnselectedChannel([t],this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:`Upload - ${t.Name}`,channels:i,product:t}}).afterClosed().pipe(y(p=>_.IsNotEmpty(p)),J(p=>this.productService.uploadSingleProduct([t],p))).subscribe({next:p=>{this.getProducts()}})}searchProduct(t){this.searchFilter.text=t,this.getProducts()}onNextPage(){this.getProducts()}onPrevPage(){this.getProducts()}onScanMultipleProduct(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty;let e=this.productService.filterChannelByTypeId(this.channelOptions,[z.Tokopedia,z.Tiktok]);this.dialog.open(D,{data:{filter:t,channelOptions:e,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(p=>_.IsNotEmpty(p))).subscribe(p=>{this.searchFilter.ChannelID=p.ChannelID,this.searchFilter.ScanFull=p.ScanFull,this.searchFilter.UpdatedProduct=p.UpdatedProduct;let f=this.productService.selectedProduct(this.products),w=this.productService.getVariantCodesProducts(f);this.scanSingleProduct(w)})}onScanSingleProduct(t){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let p=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(p)})}scanSingleProduct(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:e=>{if(e)this.toastr.success("Successfully Scan ","Success");else{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${i?.Name} `,"Error")}this.searchFilter.ChannelID=_.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=_.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}};r.\u0275fac=function(e){return new(e||r)(x(B),x(R),x(G),x(U),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-in-pos"]],decls:22,vars:13,consts:[["description","All products which is already available in POS",3,"headerTitle","onSubmit"],[4,"ngIf"],[1,"fw-bold"],["appendTo","body","bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text","mt-2",3,"clearable","items","ngModel","ngModelChange"],[1,"mt-5"],["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"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",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,i){if(e&1){let p=P();a(0,"mainpanel",0),g("onSubmit",function(w){return i.searchProduct(w)}),a(1,"actions"),S(2,ue,2,1,"ng-container",1)(3,he,4,1,"ng-container",1)(4,_e,4,1,"ng-container",1),l(),a(5,"filters")(6,"div")(7,"label",2),m(8,"Category"),l(),a(9,"ng-select",3),g("ngModelChange",function(w){return i.searchFilter.Category=w}),l()(),a(10,"div",4)(11,"mat-date-range-input",5)(12,"input",6),g("ngModelChange",function(w){return i.startDate=w})("click",function(){u(p);let w=L(15);return h(w.open())}),l(),a(13,"input",7),g("ngModelChange",function(w){return i.endDate=w})("click",function(){u(p);let w=L(15);return h(w.open())}),l()(),C(14,"mat-date-range-picker",null,8),l()(),a(16,"content")(17,"div",9)(18,"div",10),S(19,ge,2,10,"div",11)(20,Ce,3,0,"ng-container",1),l(),S(21,fe,4,4,"ng-container",1),l()()()}if(e&2){let p=L(15);s("headerTitle","In POS ("+i.rowCount+")"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(1),s("ngIf",i.productService.hasSelection(i.products)&&i.multipeScanChannels.length>0),c(1),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.Categories)("ngModel",i.searchFilter.Category),c(2),s("rangePicker",p),c(1),s("ngModel",i.startDate),c(1),s("ngModel",i.endDate),c(6),s("ngForOf",i.products),c(1),s("ngIf",i.products.length==0),c(1),s("ngIf",i.products.length>0)}},dependencies:[N,E,et,$,j,V,H,K,Y,A,Yt,Zt,qt,Qt],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}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"]});let o=r;return o})();function Se(o,r){if(o&1){let n=P();v(0),a(1,"button",10),g("click",function(){u(n);let e=d();return h(e.onOpenScanDialog())}),C(2,"i",11),m(3," Scan Channel "),l(),b()}}function xe(o,r){if(o&1){let n=P();v(0),a(1,"button",12),g("click",function(){u(n);let e=d();return h(e.onScanMultipleProduct())}),C(2,"i",11),m(3),l(),b()}if(o&2){let n=d();c(3),I(" Scan (",n.productService.selectedProduct(n.products).length,") ")}}function Pe(o,r){if(o&1){let n=P();v(0),a(1,"button",13),g("click",function(){u(n);let e=d();return h(e.onUploadMultipleProduct())}),C(2,"i",14),m(3),l(),b()}if(o&2){let n=d();c(3),I(" Upload (",n.productService.selectedProduct(n.products).length,") ")}}function ve(o,r){if(o&1&&(a(0,"span",15),C(1,"img",16),l(),m(2)),o&2){let n=r.item,t=d();c(1),s("src",t.getChannelLogo(n.TypeID),O),c(1),I(" ",n.Name," ")}}function be(o,r){if(o&1){let n=P();a(0,"div",17)(1,"label",2),m(2,"Item ID"),l(),a(3,"input",18),g("ngModelChange",function(e){u(n);let i=d();return h(i.searchFilter.Item_id=e)}),l()()}if(o&2){let n=d();c(3),s("ngModel",n.searchFilter.Item_id)}}function Ie(o,r){if(o&1){let n=P();a(0,"div",19)(1,"app-product-card",20),g("onUpload",function(){let i=u(n).$implicit,p=d();return h(p.onUploadToMultipleChannel(i))})("onDescEvent",function(){let i=u(n).index,p=d();return h(p.onOpenVariantDetail(i))})("onScan",function(){let i=u(n).$implicit,p=d();return h(p.onScanSingleProduct(i))})("onCheckBoxChange",function(e){let p=u(n).$implicit;return h(p.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=d();c(1),s("productId",n==null?null:n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null||n.Variants==null?null:n.Variants.length)>1?(n==null||n.Variants==null?null:n.Variants.length)+" Variants":null)("channels",t.productService.getChannelProduct(n))("code",t.getVariantCode(n==null?null:n.Variants))("showCheckBox",n==null?null:n.hasScan)("scanButton",!0)("uploadButton",n==null?null:n.hasUpload)("imageForZoom",n==null?null:n.ImageUrl)}}function ye(o,r){o&1&&(v(0),a(1,"div",21),C(2,"app-empty-state"),l(),b())}function we(o,r){if(o&1){let n=P();a(0,"div",22)(1,"div",23)(2,"app-custom-paginator",24),g("total",function(){u(n);let e=d();return h(e.getRowCount())})("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPreviousPage())}),l()()()}if(o&2){let n=d();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var re=(()=>{let r=class r{constructor(t,e,i,p,f,w){this.http=t,this.dialog=e,this.toastr=i,this.productService=p,this.activateRouter=f,this.authService=w,this.searchFilter=new Z,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=_.GuidEMpty,this.multipeScanChannels=[],this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(_.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.searchFilter=e.Filter,e.Filter.ChannelID!=_.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(e.Filter.ChannelID)),this.searchFilter.PageSize=e.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[z.Tokopedia,z.Tiktok])}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id};this.productService.findAllSoldInChannel(t).subscribe(e=>{this.products=e.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(t){let e=this.products[t].Variants;this.dialog.open(_t,{data:{variants:e,title:this.products[t].Name},width:"800px"})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe(y(e=>e)).subscribe(e=>{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(e,t,!this.searchFilter.UpdatedProduct),this.initPageLoader(_.GuidEMpty))})}onScanSingleProduct(t){t.Channel=this.productService.getChannelProduct(t);let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(D,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let p=this.productService.getVariantCodesProduct(t);this.scanProducts(p)})}onUploadToMultipleChannel(t){let e=this.productService.getChannelProduct(t);t.Channel=e;let i=this.productService.filterUnselectedChannel([t],this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:`Upload - ${t.Name}`,channels:i,product:t}}).afterClosed().pipe(y(p=>_.IsNotEmpty(p)),J(p=>this.productService.uploadSingleProduct([t],p))).subscribe({next:p=>{this.getProducts()}})}onScanMultipleProduct(){this.searchFilter.ChannelID=_.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(D,{data:{filter:t,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct;let p=this.productService.selectedProduct(this.products),f=this.productService.getVariantCodesProducts(p);this.scanProducts(f)})}scanProducts(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:e=>{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);e?this.toastr.success(`Product Successfully scan with ${i?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${i?.Name} `,"Error"),this.searchFilter.ChannelID=_.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=_.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}onClearFilterChannel(){this.searchFilter.ChannelID=_.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products),e=this.productService.filterUnselectedChannel(t,this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe(y(i=>_.IsNotEmpty(i)),J(i=>this.productService.uploadMultipleProduct(t,i))).subscribe({next:i=>{this.getProducts()}})}getRowCount(){let t={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text};this.http.post("/api/product/GetSoldInChannelRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Total})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(t){return _.getChannelLogoByTypeId(t)}};r.\u0275fac=function(e){return new(e||r)(x(B),x(G),x(R),x(U),x(mt),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-sold-in-channel"]],decls:18,vars:12,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"headerTitle","onSubmit"],[4,"ngIf"],[1,"fw-bold"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text","mt-2",3,"clearable","multiple","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],["class","mt-5",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"],[1,"mt-5"],["type","text","name","Item_id","id","Item_id",1,"form-control","mt-2",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,i){e&1&&(a(0,"mainpanel",0),g("onSubmit",function(f){return i.searchProduct(f)}),a(1,"actions"),S(2,Se,4,0,"ng-container",1)(3,xe,4,1,"ng-container",1)(4,Pe,4,1,"ng-container",1),l(),a(5,"filters")(6,"div")(7,"label",2),m(8,"Channel"),l(),a(9,"ng-select",3),g("ngModelChange",function(f){return i.searchFilter.ListChannelID=f})("clear",function(){return i.onClearFilterChannel()}),S(10,ve,3,2,"ng-template",4),l()(),S(11,be,4,1,"div",5),l(),a(12,"content")(13,"div",6)(14,"div",7),S(15,Ie,2,10,"div",8)(16,ye,3,0,"ng-container",1),l(),S(17,we,3,4,"div",9),l()()()),e&2&&(s("headerTitle","Sold in Channel"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(1),s("ngIf",i.multipeScanChannels.length>0&&i.productService.hasSelection(i.products)),c(1),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("multiple",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(2),s("ngIf",i.searchFilter.ListChannelID!=null),c(4),s("ngForOf",i.products),c(1),s("ngIf",i.products.length==0),c(1),s("ngIf",i.products==null?null:i.products.length))},dependencies:[N,E,et,$,j,V,H,nt,K,Y,A],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}"]});let o=r;return o})();function Oe(o,r){if(o&1){let n=P();a(0,"button",10),g("click",function(){u(n);let e=d(2);return h(e.uploadMultipleProduct())}),C(1,"i",11),m(2),l()}if(o&2){let n=d(2);c(2),I(" upload (",n.selectedProducts==null?null:n.selectedProducts.length,") ")}}function Fe(o,r){if(o&1){let n=P();v(0),a(1,"td",26)(2,"input",27),g("ngModelChange",function(e){u(n);let i=d(2).$implicit;return h(i.selected=e)})("ngModelChange",function(){u(n);let e=d(3).ngIf,i=d(3);return h(i.onSelectProduct(e))}),l()(),b()}if(o&2){let n=d(2).$implicit;c(1),s("rowSpan",n==null?null:n.Variants.length),c(1),s("ngModel",n.selected)}}function De(o,r){if(o&1){let n=P();v(0),a(1,"img",33),g("click",function(e){u(n);let i=d(3).$implicit,p=d(4);return h(p.onZoomImage(e,i==null?null:i.ImageUrl))}),l(),b()}if(o&2){let n=d(3).$implicit;c(1),s("src",n==null?null:n.ImageUrl,O)}}function Te(o,r){o&1&&C(0,"img",34)}function Ne(o,r){if(o&1&&(v(0),a(1,"td",26)(2,"div",28),S(3,De,2,1,"ng-container",7)(4,Te,1,0,"ng-template",null,29,tt),l()(),a(6,"td",30)(7,"h4",31)(8,"span",32),m(9),l()()(),b()),o&2){let n=L(5),t=d(2).$implicit;c(1),s("rowSpan",t==null?null:t.Variants.length),c(2),s("ngIf",t==null?null:t.ImageUrl)("ngIfElse",n),c(3),s("rowSpan",t==null?null:t.Variants.length),c(2),s("matTooltip",(t==null||t.Name==null?null:t.Name.length)>50?t==null?null:t.Name:""),c(1),I(" ",t==null?null:t.Name," ")}}function Ee(o,r){if(o&1&&(a(0,"div")(1,"a",22),C(2,"img",35),l()()),o&2){let n=r.$implicit;c(1),s("href",n.URL,O),c(1),s("src",n.Img,O)("matTooltip",n.Name)}}function ke(o,r){if(o&1&&(a(0,"div"),C(1,"img",35),l()),o&2){let n=r.$implicit;c(1),s("src",n.Img,O)("matTooltip",n.Name)}}function Ve(o,r){if(o&1&&(a(0,"tr"),S(1,Fe,3,2,"ng-container",9)(2,Ne,10,6,"ng-container",9),a(3,"td"),m(4),l(),a(5,"td")(6,"span"),m(7),l(),a(8,"span",21)(9,"a",22),C(10,"i",23),l()()(),a(11,"td",24)(12,"div",25),S(13,Ee,3,3,"div",20),l()(),a(14,"td",24)(15,"div",25),S(16,ke,2,2,"div",20),l()()()),o&2){let n=r.$implicit,t=r.index,e=d(5);c(1),s("ngIf",t==0),c(1),s("ngIf",t==0),c(2),I(" ",n.Name," "),c(3),I(" ",n.Code," "),c(2),s("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),O),c(4),s("ngForOf",n==null?null:n.Available),c(3),s("ngForOf",n==null?null:n.NotAvailable)}}function Ue(o,r){if(o&1&&(v(0),S(1,Ve,17,7,"tr",20),b()),o&2){let n=r.$implicit;c(1),s("ngForOf",n.Variants)}}function Ae(o,r){if(o&1&&(a(0,"tbody"),S(1,Ue,2,1,"ng-container",20),l()),o&2){let n=r.ngIf;c(1),s("ngForOf",n)}}function Le(o,r){if(o&1&&(v(0),a(1,"div",12)(2,"table",13)(3,"thead",14)(4,"tr"),C(5,"th",15),a(6,"th",16),m(7,"Product"),l(),a(8,"th",17),m(9,"Variant"),l(),a(10,"th",17),m(11,"SKU"),l(),a(12,"th",18),m(13,"Available In"),l(),a(14,"th",19),m(15,"Not Available In"),l()()(),S(16,Ae,2,1,"tbody",9),F(17,"async"),l()(),b()),o&2){let n=d(2);c(16),s("ngIf",T(17,1,n.data$))}}function Re(o,r){o&1&&(a(0,"div",36),C(1,"app-empty-state"),l())}function Be(o,r){if(o&1){let n=P();a(0,"span",44),g("click",function(){u(n);let e=d(4);return h(e.getRowCount())}),a(1,"i",45),m(2,"?"),l()()}}function $e(o,r){if(o&1&&(a(0,"span"),m(1),F(2,"number"),l()),o&2){let n=r.ngIf;c(1),st(T(2,1,n==null?null:n.Count))}}function je(o,r){if(o&1){let n=P();a(0,"a",46),g("click",function(){u(n);let e=d(4);return h(e.onNextPage())}),C(1,"i",47),m(2," Next"),l()}}function Ge(o,r){if(o&1){let n=P();a(0,"a",48),g("click",function(){u(n);let e=d(4);return h(e.onLastPage())}),C(1,"i",49),m(2," Last"),l()}}function Ke(o,r){if(o&1&&(v(0),a(1,"div",37)(2,"div",38)(3,"div",39),m(4),F(5,"number"),S(6,Be,3,0,"span",40)(7,$e,3,3,"span",9),F(8,"async"),m(9),l()(),a(10,"div",41),S(11,je,3,0,"a",42)(12,Ge,3,0,"a",43),l()(),b()),o&2){let n=d().ngIf,t=d(2);c(4),I(" Showing 1 - ",T(5,6,n==null?null:n.length)," of "),c(2),s("ngIf",t.paginationService.hideCount),c(1),s("ngIf",!t.paginationService.hideCount&&T(8,8,t.rowCount$)),c(2),I(" records ~ ",t.paginationService.footerPageNumber," Page "),c(2),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),c(1),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function Je(o,r){if(o&1&&(v(0),S(1,Ke,13,10,"ng-container",9),b()),o&2){let n=r.ngIf;c(1),s("ngIf",(n==null?null:n.length)>0)}}function ze(o,r){if(o&1){let n=P();a(0,"mainpanel",1),g("onSubmit",function(e){u(n);let i=d();return h(i.searchProduct(e))}),a(1,"actions"),S(2,Oe,3,1,"button",2),a(3,"button",3),g("click",function(){u(n);let e=d();return h(e.openScanDialog())}),C(4,"i",4),m(5," Scan Channel "),l()(),a(6,"content")(7,"div",5)(8,"div",6),S(9,Le,18,3,"ng-container",7),F(10,"async"),S(11,Re,2,0,"ng-template",null,8,tt),l(),S(13,Je,2,1,"ng-container",9),F(14,"async"),l()()()}if(o&2){let n=L(12),t=d(),e;s("hideSearchDropdown",!0),c(2),s("ngIf",t.hasSelectionProduct),c(7),s("ngIf",((e=T(10,5,t.data$))==null?null:e.length)>0)("ngIfElse",n),c(4),s("ngIf",T(14,7,t.data$))}}var ae=(()=>{let r=class r{constructor(t,e,i,p,f,w,yt){this.http=t,this.dialog=e,this.toastr=i,this.productService=p,this.paginationService=f,this.biggerPictureService=w,this.authService=yt,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.channelOptions=yt.getChannels(),this.hostName=this.authService.getDomain()}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe(Ot(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(Mt(t=>(t=t.map(e=>(e.Variants=e.Variants.map(i=>(i.Available=this.productService.sortChannel(i.Available),i.NotAvailable=this.productService.sortChannel(i.NotAvailable),i.Available=this.assignLogoChannel(i.Available),i.NotAvailable=this.assignLogoChannel(i.NotAvailable),i)),e)),t)))}assignLogoChannel(t){return t=t.map(e=>(e.Img=_.getChannelLogoByTypeId(e.TypeID),e)),t}searchProduct(t){this.filterSearch.text=t,this.paginationService.reloadPagination(this.filterSearch)}scanAllProduct(){let t=this.productService.findChannelById(this.filterSearch.ChannelID,this.channelOptions);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(e=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(e,t,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.filterSearch));t.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.filterSearch.ChannelID=i.ChannelID,this.filterSearch.ScanFull=i.ScanFull,this.filterSearch.UpdatedProduct=i.UpdatedProduct,this.filterSearch.Async=i.Async,this.scanAllProduct()})}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:t=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,t.Count)}})}onZoomImage(t,e){this.biggerPictureService.openBiggerPicture(t,e)}onSelectProduct(t){this.hasSelectionProduct=this.productService.hasSelection(t),this.selectedProducts=this.productService.selectedProduct(t)}uploadMultipleProduct(){let t=this.getUniqueChannels();t=t.map(e=>(e.ID=e.ChannelID,e)),this.dialog.open(q,{width:"700px",data:{title:"Upload Multiple Product",channels:t}}).afterClosed().pipe(y(e=>_.IsNotEmpty(e)),J(e=>{let i=this.getSelectedProductIds();return this.productService.uploadNotInChannel(i,e)})).subscribe({next:()=>{this.paginationService.reloadPagination(this.filterSearch),this.selectedProducts=[],this.hasSelectionProduct=!1},error:e=>{this.selectedProducts=[],this.hasSelectionProduct=!1}})}getSelectedProductIds(){return this.selectedProducts.map(e=>({ID:e.ProductID}))}getUniqueChannels(){let t=[];return this.selectedProducts.forEach(e=>{t=[...t,...e.Variants[0].NotAvailable]}),t=t.filter((e,i,p)=>p.findIndex(f=>f.ChannelID==e.ChannelID)==i),t}ngOnDestroy(){this.paginationService.destroy()}};r.\u0275fac=function(e){return new(e||r)(x(B),x(G),x(R),x(U),x(Xt),x(Ht),x(k))},r.\u0275cmp=M({type:r,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",""],[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,"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,i){e&1&&(S(0,ze,15,9,"mainpanel",0),F(1,"async")),e&2&&s("ngIf",T(1,1,i.loader$))},dependencies:[N,E,Ut,$,j,V,ht,A,pt,dt],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%}"]});let o=r;return o})();function He(o,r){if(o&1){let n=P();a(0,"button",14),g("click",function(){u(n);let e=d();return h(e.openScanDialog())}),C(1,"i",15),m(2," Scan Channel "),l()}}function Ze(o,r){if(o&1){let n=P();v(0),a(1,"button",16),g("click",function(){u(n);let e=d();return h(e.onDownloadAllProduct("SELECTED"))}),C(2,"i",17),m(3),l(),b()}if(o&2){let n=d(),t;c(3),I(" Download (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function qe(o,r){if(o&1&&(a(0,"span",18),C(1,"img",19),l(),m(2)),o&2){let n=r.item,t=d();c(1),s("src",t.getChannelLogo(n.TypeID),O),c(1),I(" ",n.Name," ")}}var Ye=o=>[o],Qe=()=>[];function We(o,r){if(o&1){let n=P();a(0,"div",20)(1,"app-product-card",21),g("onCheckBoxChange",function(e){let p=u(n).index,f=d();return h(f.onSelectProduct(e,p))})("onDescEvent",function(){let i=u(n).index,p=d();return h(p.onShowVariantDetail(i))})("onDownload",function(){let i=u(n).$implicit,p=d();return h(p.onDownloadProduct(i))})("onScan",function(){let i=u(n).$implicit,p=d();return h(p.onScanChannel(i))}),l()()}if(o&2){let n=r.$implicit;c(1),s("showRedirectIcon",!1)("title",n==null?null:n.Name)("image",n==null?null:n.Image)("imageForZoom",n==null?null:n.Image)("code",n==null?null:n.SKU)("description",(n==null||n.Variant==null?null:n.Variant.length)>0?(n==null||n.Variant==null?null:n.Variant.length)+" Variants":null)("downloadButton",!0)("channels",n!=null&&n.Channel?it(10,Ye,n==null?null:n.Channel):Q(12,Qe))("showCheckBox",!0)("scanButton",!0)}}function Xe(o,r){o&1&&(v(0),a(1,"div",22),C(2,"app-empty-state"),l(),b())}function tn(o,r){if(o&1){let n=P();a(0,"div",23)(1,"div",24)(2,"app-custom-paginator",25),g("total",function(){u(n);let e=d();return h(e.getRowCount())})("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPreviousPage())}),l()()()}if(o&2){let n=d();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var le=(()=>{let r=class r{constructor(t,e,i,p,f,w){this.http=t,this.dialog=e,this.productService=i,this.toastrService=p,this.activateRouter=f,this.authService=w,this.searchFilter=new Z,this.products=[],this.hasClickRowCount=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(_.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(t=>{this.products=t.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let t;this.products=this.products.map(e=>(t=this.channelOptions.find(i=>i.ID==e.ChannelID),t?e.Channel=JSON.parse(JSON.stringify(t)):e.Channel=null,e)).map(e=>(e.Channel&&(e.Channel.Url=e.Url),e))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?_.IsNotEmpty(t?.ChannelItemSKU)?t.SKU=t?.ChannelItemSKU:t.SKU="SKU not assigned":t.SKU=t?.Variant[0]?.ChannelVariationSKU?t?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",t))}onSearch(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=_.GuidEMpty}onScanAll(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{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(_.GuidEMpty),this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=_.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.Async=i.Async,this.onScanAll()})}onDownloadAllProduct(t){let e;t=="ALL"?e=this.products:e=this.productService.selectedProduct(this.products),e.length>0&&this.productService.downloadMultipleProduct(e).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,e){this.products[e].selected=t}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let e=JSON.parse(JSON.stringify(t));delete e.Channel,this.productService.scanCompareToPos([e]).subscribe(i=>{i.Status?(this.initPageLoader(_.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let e=this.products[t].Variant;e.length>0&&this.dialog.open(te,{data:{title:this.products[t].Name,variants:e},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Count})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(t){return _.getChannelLogoByTypeId(t)}};r.\u0275fac=function(e){return new(e||r)(x(B),x(G),x(U),x(R),x(mt),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-pos"]],decls:30,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,"fw-bold"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text","mt-2",3,"clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[1,"mt-5"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModel","ngModelChange"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",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,i){e&1&&(a(0,"mainpanel",0),g("onSubmit",function(f){return i.onSearch(f)}),a(1,"actions"),S(2,He,3,0,"button",1)(3,Ze,4,1,"ng-container",2),l(),a(4,"filters")(5,"div")(6,"label",3),m(7,"Channel"),l(),a(8,"ng-select",4),g("ngModelChange",function(f){return i.searchFilter.ChannelID=f})("clear",function(){return i.onClearChannelFilter()}),S(9,qe,3,2,"ng-template",5),l()(),a(10,"div",6)(11,"label",3),m(12,"SKU Assigned"),l(),a(13,"mat-radio-group",7),g("ngModelChange",function(f){return i.searchFilter.HaveSku=f}),a(14,"mat-radio-button",8),m(15," All "),l(),a(16,"mat-radio-button",8),m(17," Yes "),l(),a(18,"mat-radio-button",8),m(19," No "),l()()(),a(20,"div",6)(21,"label",3),m(22,"Item ID"),l(),a(23,"input",9),g("ngModelChange",function(f){return i.searchFilter.Item_id=f}),l()()(),a(24,"content")(25,"div",10)(26,"div",11),S(27,We,2,13,"div",12)(28,Xe,3,0,"ng-container",2),l(),S(29,tn,3,4,"div",13),l()()()),e&2&&(c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(1),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ChannelID),c(5),s("ngModel",i.searchFilter.HaveSku),c(1),s("value",0),c(2),s("value",1),c(2),s("value",2),c(5),s("ngModel",i.searchFilter.Item_id),c(4),s("ngForOf",i.products),c(1),s("ngIf",i.products.length==0),c(1),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[N,E,et,$,j,V,H,nt,Kt,Jt,K,Y,A],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}"]});let o=r;return o})();function en(o,r){if(o&1&&(a(0,"span",8),C(1,"img",9),l(),m(2)),o&2){let n=r.item,t=d();c(1),s("src",t.getChannelLogo(n.TypeID),O),c(1),I(" ",n.Name," ")}}function nn(o,r){if(o&1&&(a(0,"div",10),C(1,"app-duplicate-product-card",11),l()),o&2){let n=r.$implicit,t=r.index;c(1),s("imageForZoom",n.ImageUrl)("title",n.Name)("code",n.Code)("id",t)("image",n.ThumbnailURL)("channels",n.Channels)}}function on(o,r){o&1&&(v(0),a(1,"div",12),C(2,"app-empty-state"),l(),b())}function rn(o,r){if(o&1){let n=P();v(0),a(1,"div",13)(2,"div",14)(3,"app-custom-paginator",15),g("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPrevPage())})("total",function(){u(n);let e=d();return h(e.getRowCount())}),l()()(),b()}if(o&2){let n=d();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickedRowCount)}}var ce=(()=>{let r=class r{constructor(t,e,i){this.httpService=t,this.productService=e,this.authService=i,this.searchFilter=new Z,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader(),this.channelOptions=i.getChannels()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",t).subscribe(e=>{this.products=e.Data})}onSearch(t){this.searchFilter.text=t,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=_.GuidEMpty}getChannelLogo(t){return _.getChannelLogoByTypeId(t)}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(e=>{this.hasClickedRowCount=!0,this.rowCount=e.Total})}};r.\u0275fac=function(e){return new(e||r)(x(B),x(U),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-duplicate-sku"]],decls:14,vars:7,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["container",""],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text","mt-2",3,"multiple","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","id","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,i){e&1&&(a(0,"mainpanel",0),g("onSubmit",function(f){return i.onSearch(f)}),a(1,"filters")(2,"div",1)(3,"div")(4,"h6"),m(5,"Channel"),l(),a(6,"ng-select",2),g("ngModelChange",function(f){return i.searchFilter.ListChannelID=f})("clear",function(){return i.onClearFilter()}),S(7,en,3,2,"ng-template",3),l()()()(),a(8,"content")(9,"div",4)(10,"div",5),S(11,nn,2,6,"div",6)(12,on,3,0,"ng-container",7),l(),S(13,rn,4,4,"ng-container",7),l()()()),e&2&&(c(6),s("multiple",!0)("clearable",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(5),s("ngForOf",i.products),c(1),s("ngIf",(i.products==null?null:i.products.length)==0),c(1),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[N,E,$,j,V,H,nt,gt,K,A]});let o=r;return o})();function an(o,r){if(o&1&&(v(0),m(1),b()),o&2){let n=d().$implicit;c(1),I(" ",n.Count," ")}}function ln(o,r){if(o&1){let n=P();a(0,"span",26),g("click",function(){u(n);let e=d().$implicit,i=d(2);return h(i.getLiveProductCount(e.ID,e))}),C(1,"i",27),l()}}var cn=()=>["/menu/products/status/sold-in-channel"],se=o=>({ID:o}),sn=()=>["/menu/products/status/not-in-pos"];function pn(o,r){if(o&1){let n=P();a(0,"tr")(1,"td"),C(2,"img",16),a(3,"span",17),m(4),l()(),a(5,"td",18),S(6,an,2,1,"ng-container",4)(7,ln,2,0,"ng-template",null,19,tt),l(),a(9,"td",18)(10,"a",20),m(11),F(12,"number"),l()(),a(13,"td",18)(14,"a",20),m(15),F(16,"number"),l()(),a(17,"td"),m(18),F(19,"date"),l(),a(20,"td")(21,"div",21)(22,"button",22),g("click",function(){let i=u(n).$implicit,p=d(2);return h(p.onScanChannel(i))}),C(23,"i",23),m(24," Scan "),l(),a(25,"button",24),g("click",function(){let i=u(n).$implicit,p=d(2);return h(p.onClearCache(i.ID))}),C(26,"i",25),m(27," Clear "),l()()()()}if(o&2){let n=r.$implicit,t=L(8),e=d(2);c(2),s("src",e.getChannelLogo(n.TypeID),O),c(2),st(n.Name),c(2),s("ngIf",n.Count!==void 0)("ngIfElse",t),c(4),s("routerLink",Q(18,cn))("queryParams",it(19,se,n.ID)),c(1),I(" ",T(12,11,n.SoldInChannel)," "),c(3),s("routerLink",Q(21,sn))("queryParams",it(22,se,n.ID)),c(1),I(" ",T(16,13,n.NotInPOS)," "),c(3),I("",n.LastSync?Tt(19,15,n.LastSync,"dd MMM yyyy HH:mm"):"-"," ")}}function dn(o,r){if(o&1&&(v(0),a(1,"div",6)(2,"table",7)(3,"thead",8)(4,"tr",9)(5,"th"),m(6,"Channel"),l(),a(7,"th",10),m(8,"Live Product"),l(),a(9,"th",11),m(10,"Sold In Channel"),l(),a(11,"th",12),m(12,"Product Not in POS"),l(),a(13,"th",13),m(14,"Last Sync"),l(),C(15,"th",14),l()(),a(16,"tbody"),S(17,pn,28,24,"tr",15),F(18,"async"),l()()(),b()),o&2){let n=d(),t;c(17),s("ngForOf",(t=T(18,1,n.channels$))==null?null:t.Data)}}function mn(o,r){o&1&&(a(0,"div",28),C(1,"app-empty-state"),l())}var pe=(()=>{let r=class r{constructor(t,e,i,p){this.productService=t,this.toastr=e,this.dialog=i,this.authService=p,this.destroy$=new wt,this.channelOptions=p.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,e){this.productService.getTotalProductLive(t).pipe(Pt(this.destroy$)).subscribe(i=>{e.Count=i.Count})}onScanChannel(t){this.dialog.open(D,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:t.ID},disabledChannelOption:!0}}).afterClosed().pipe(y(e=>_.IsNotEmpty(e))).subscribe(e=>{this.scanAllProduct(t.ID,e)})}scanAllProduct(t,e){let i=this.productService.findChannelById(t,this.channelOptions);this.productService.scanAll(e.ChannelID,e.ScanFull,e.UpdatedProduct,e.Async).pipe(y(p=>p)).subscribe(p=>{e.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(p,i,!e.UpdatedProduct),this.setObsProductStatistic())})}onClearCache(t){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(t).pipe(Pt(this.destroy$)).subscribe(i=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(t){return _.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(e){return new(e||r)(x(U),x(R),x(G),x(k))},r.\u0275cmp=M({type:r,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,i){if(e&1&&(a(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3),S(5,dn,19,3,"ng-container",4),F(6,"async"),S(7,mn,2,0,"ng-template",null,5,tt),l()()()()()),e&2){let p=L(8),f;s("hideSearchBox",!0)("hideSearchDropdown",!0),c(5),s("ngIf",((f=T(6,4,i.channels$))==null||f.Data==null?null:f.Data.length)>0)("ngIfElse",p)}},dependencies:[N,E,V,ht,ut,A,pt,dt,Nt]});let o=r;return o})();var un=[{component:ne,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:oe,canActivate:[W],data:{title:"Products in POS"}},{path:"sold-in-channel",component:re,canActivate:[W],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:ae,canActivate:[W],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:le,canActivate:[W],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:ce,canActivate:[W],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:pe,canActivate:[W],data:{title:"Channel Statistic"}}]}],yi=(()=>{let r=class r{};r.\u0275fac=function(e){return new(e||r)},r.\u0275mod=Dt({type:r}),r.\u0275inj=Ft({imports:[Et,At,$t,Bt,Lt,ee,zt,Gt,gt,K,Y,Vt.forChild(un),Wt,Rt]});let o=r;return o})();export{yi as StatusModule};
|
|
1
|
+
import{a as _t,c as q,d as te}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-UT3B5YJG.js";import{a as Z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-AFZN3DRI.js";import{a as A}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-3FP6R342.js";import{d as Zt,e as qt,f as Yt,g as Qt,k as Wt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-6JIO3MDW.js";import{a as Y,b as gt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-WKCOG4BN.js";import{a as K}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-PNDM4FNI.js";import{b as ee}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-PIHDABAW.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-LQIHGVQQ.js";import{a as Xt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-75ETOW5V.js";import{a as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-DWNMRBOC.js";import{a as U}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-USTXSCDN.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-KLFNBFWY.js";import{a as jt,b as Gt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-AN2CINQU.js";import{f as k}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-BCZIDBRQ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-SPVU5YQJ.js";import{b as R,e as B}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-FYZEL73T.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-7HNQOPUO.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-7O7ZV66V.js";import{a as Ht}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-DCYKOVAM.js";import{a as Kt,b as Jt,c as zt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-J4BS5HHW.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-7CFOLDEA.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-TPZUQ3VA.js";import{a as nt,c as H,d as Lt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-KFK76TSL.js";import{a as W}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-VBDYQMXW.js";import{B as V,C as $t,q as ht,r as Bt,u as G}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-AR5AIUY5.js";import{T as Rt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-2VBEH64C.js";import{b as Ut,c as et,h as $,k as j,u as At}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-TXDNQ6BP.js";import{b as z,c as _}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-SLQJFLQ4.js";import{$a as C,$b as E,B as y,Db as F,Eb as T,Fa as c,Fb as Tt,Ga as x,Hc as mt,Ic as kt,Kc as ut,Mb as tt,Mc as Vt,Oa as s,T as J,Ua as S,V as Pt,X as Ot,Za as a,_a as l,_b as N,aa as Ft,ab as v,bb as b,c as wt,cc as pt,db as P,dc as Nt,ea as M,fa as Dt,fc as dt,gc as Et,hb as g,ja as u,jb as d,ka as h,ob as L,pb as m,q as Mt,qb as st,rb as I,vb as Q,wb as it,za as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-VM6WJ77V.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-SVMOHTLO.js";var de=()=>["/menu/products/download/by-url"],ne=(()=>{let r=class r{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 Listing",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"}]}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=M({type:r,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,i){e&1&&(a(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),l()(),a(4,"div")(5,"div",3)(6,"a",4),C(7,"i",5),l(),a(8,"div",6)(9,"div",7)(10,"a",8),m(11,"Download Product By Url"),l()()()()()(),C(12,"router-outlet")),e&2&&(c(3),s("Tabs",i.productTabs),c(7),s("routerLink",Q(2,de)))},dependencies:[jt,kt,ut]});let o=r;return o})();function me(o,r){if(o&1){let n=P();a(0,"button",13),g("click",function(){u(n);let e=d(2);return h(e.onOpenScanDialog())}),C(1,"i",14),m(2," Scan Channel "),l()}}function ue(o,r){if(o&1&&(v(0),S(1,me,3,0,"button",12),b()),o&2){let n=d();c(1),s("ngIf",!n.productService.hasSelection(n.products))}}function he(o,r){if(o&1){let n=P();v(0),a(1,"button",15),g("click",function(){u(n);let e=d();return h(e.onScanMultipleProduct())}),C(2,"i",14),m(3),l(),b()}if(o&2){let n=d(),t;c(3),I(" Scan (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function _e(o,r){if(o&1){let n=P();v(0),a(1,"button",16),g("click",function(){u(n);let e=d();return h(e.onUploadMultipleProduct())}),C(2,"i",17),m(3),l(),b()}if(o&2){let n=d(),t;c(3),I(" Upload (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function ge(o,r){if(o&1){let n=P();a(0,"div",18)(1,"app-product-card",19),g("onUpload",function(){let i=u(n).$implicit,p=d();return h(p.onUploadToMultipleChannel(i))})("onScan",function(){let i=u(n).$implicit,p=d();return h(p.onScanSingleProduct(i))})("onDescEvent",function(){let i=u(n).index,p=d();return h(p.onOpenDialogVariant(i))})("onCheckBoxChange",function(e){let p=u(n).$implicit;return h(p.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=d();c(1),s("productId",n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null?null:n.Variants.length)>1?(n==null?null:n.Variants.length)+" Variants":null)("channels",t.productService.getChannelProduct(n))("code",t.getVariantCode(n==null?null:n.Variants))("showCheckBox",(n==null?null:n.Channel.length)<t.channelOptions.length)("scanButton",!0)("uploadButton",n==null?null:n.hasUpload)("imageForZoom",n==null?null:n.ImageUrl)}}function Ce(o,r){o&1&&(v(0),a(1,"div",20),C(2,"app-empty-state"),l(),b())}function fe(o,r){if(o&1){let n=P();v(0),a(1,"div",21)(2,"div",22)(3,"app-custom-paginator",23),g("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPrevPage())}),l()()(),b()}if(o&2){let n=d();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",!0)}}var oe=(()=>{let r=class r{constructor(t,e,i,p,f){this.http=t,this.toastr=e,this.dialog=i,this.productService=p,this.authService=f,this.searchFilter=new Z,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.getLoaderPage(),this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(t=>{this.Categories=t.Options.Categories,this.searchFilter.PageNumber=t.Filter.PageNumber,this.searchFilter.RowCount=t.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=t.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[z.Tokopedia,z.Tiktok])}getProducts(){let t={PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate};this.http.post("/api/product/GetInPOS",t).subscribe(e=>{this.products=e.Data,this.rowCount=e.Total==null?this.searchFilter.RowCount:e.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter.ChannelID==null){this.toastr.error("Please Select Channel","Error");return}this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{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 e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,e,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(t){this.dialog.open(_t,{data:{title:this.products[t].Name,variants:this.products[t].Variants},width:"800px"})}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products),e=this.productService.filterUnselectedChannel(t,this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe(y(i=>_.IsNotEmpty(i)),J(i=>this.productService.uploadMultipleProduct(t,i))).subscribe({next:i=>{this.getProducts()}})}onUploadToMultipleChannel(t){let e=this.productService.getChannelProduct(t);t.Channel=e;let i=this.productService.filterUnselectedChannel([t],this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:`Upload - ${t.Name}`,channels:i,product:t}}).afterClosed().pipe(y(p=>_.IsNotEmpty(p)),J(p=>this.productService.uploadSingleProduct([t],p))).subscribe({next:p=>{this.getProducts()}})}searchProduct(t){this.searchFilter.text=t,this.getProducts()}onNextPage(){this.getProducts()}onPrevPage(){this.getProducts()}onScanMultipleProduct(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty;let e=this.productService.filterChannelByTypeId(this.channelOptions,[z.Tokopedia,z.Tiktok]);this.dialog.open(D,{data:{filter:t,channelOptions:e,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(p=>_.IsNotEmpty(p))).subscribe(p=>{this.searchFilter.ChannelID=p.ChannelID,this.searchFilter.ScanFull=p.ScanFull,this.searchFilter.UpdatedProduct=p.UpdatedProduct;let f=this.productService.selectedProduct(this.products),w=this.productService.getVariantCodesProducts(f);this.scanSingleProduct(w)})}onScanSingleProduct(t){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let p=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(p)})}scanSingleProduct(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:e=>{if(e)this.toastr.success("Successfully Scan ","Success");else{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${i?.Name} `,"Error")}this.searchFilter.ChannelID=_.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=_.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}};r.\u0275fac=function(e){return new(e||r)(x(B),x(R),x(G),x(U),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-in-pos"]],decls:22,vars:13,consts:[["description","All products which is already available in POS",3,"headerTitle","onSubmit"],[4,"ngIf"],[1,"fw-bold"],["appendTo","body","bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text","mt-2",3,"clearable","items","ngModel","ngModelChange"],[1,"mt-5"],["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"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",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,i){if(e&1){let p=P();a(0,"mainpanel",0),g("onSubmit",function(w){return i.searchProduct(w)}),a(1,"actions"),S(2,ue,2,1,"ng-container",1)(3,he,4,1,"ng-container",1)(4,_e,4,1,"ng-container",1),l(),a(5,"filters")(6,"div")(7,"label",2),m(8,"Category"),l(),a(9,"ng-select",3),g("ngModelChange",function(w){return i.searchFilter.Category=w}),l()(),a(10,"div",4)(11,"mat-date-range-input",5)(12,"input",6),g("ngModelChange",function(w){return i.startDate=w})("click",function(){u(p);let w=L(15);return h(w.open())}),l(),a(13,"input",7),g("ngModelChange",function(w){return i.endDate=w})("click",function(){u(p);let w=L(15);return h(w.open())}),l()(),C(14,"mat-date-range-picker",null,8),l()(),a(16,"content")(17,"div",9)(18,"div",10),S(19,ge,2,10,"div",11)(20,Ce,3,0,"ng-container",1),l(),S(21,fe,4,4,"ng-container",1),l()()()}if(e&2){let p=L(15);s("headerTitle","In POS ("+i.rowCount+")"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(1),s("ngIf",i.productService.hasSelection(i.products)&&i.multipeScanChannels.length>0),c(1),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.Categories)("ngModel",i.searchFilter.Category),c(2),s("rangePicker",p),c(1),s("ngModel",i.startDate),c(1),s("ngModel",i.endDate),c(6),s("ngForOf",i.products),c(1),s("ngIf",i.products.length==0),c(1),s("ngIf",i.products.length>0)}},dependencies:[N,E,et,$,j,V,H,K,Y,A,Yt,Zt,qt,Qt],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}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"]});let o=r;return o})();function Se(o,r){if(o&1){let n=P();v(0),a(1,"button",10),g("click",function(){u(n);let e=d();return h(e.onOpenScanDialog())}),C(2,"i",11),m(3," Scan Channel "),l(),b()}}function xe(o,r){if(o&1){let n=P();v(0),a(1,"button",12),g("click",function(){u(n);let e=d();return h(e.onScanMultipleProduct())}),C(2,"i",11),m(3),l(),b()}if(o&2){let n=d();c(3),I(" Scan (",n.productService.selectedProduct(n.products).length,") ")}}function Pe(o,r){if(o&1){let n=P();v(0),a(1,"button",13),g("click",function(){u(n);let e=d();return h(e.onUploadMultipleProduct())}),C(2,"i",14),m(3),l(),b()}if(o&2){let n=d();c(3),I(" Upload (",n.productService.selectedProduct(n.products).length,") ")}}function ve(o,r){if(o&1&&(a(0,"span",15),C(1,"img",16),l(),m(2)),o&2){let n=r.item,t=d();c(1),s("src",t.getChannelLogo(n.TypeID),O),c(1),I(" ",n.Name," ")}}function be(o,r){if(o&1){let n=P();a(0,"div",17)(1,"label",2),m(2,"Item ID"),l(),a(3,"input",18),g("ngModelChange",function(e){u(n);let i=d();return h(i.searchFilter.Item_id=e)}),l()()}if(o&2){let n=d();c(3),s("ngModel",n.searchFilter.Item_id)}}function Ie(o,r){if(o&1){let n=P();a(0,"div",19)(1,"app-product-card",20),g("onUpload",function(){let i=u(n).$implicit,p=d();return h(p.onUploadToMultipleChannel(i))})("onDescEvent",function(){let i=u(n).index,p=d();return h(p.onOpenVariantDetail(i))})("onScan",function(){let i=u(n).$implicit,p=d();return h(p.onScanSingleProduct(i))})("onCheckBoxChange",function(e){let p=u(n).$implicit;return h(p.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=d();c(1),s("productId",n==null?null:n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null||n.Variants==null?null:n.Variants.length)>1?(n==null||n.Variants==null?null:n.Variants.length)+" Variants":null)("channels",t.productService.getChannelProduct(n))("code",t.getVariantCode(n==null?null:n.Variants))("showCheckBox",n==null?null:n.hasScan)("scanButton",!0)("uploadButton",n==null?null:n.hasUpload)("imageForZoom",n==null?null:n.ImageUrl)}}function ye(o,r){o&1&&(v(0),a(1,"div",21),C(2,"app-empty-state"),l(),b())}function we(o,r){if(o&1){let n=P();a(0,"div",22)(1,"div",23)(2,"app-custom-paginator",24),g("total",function(){u(n);let e=d();return h(e.getRowCount())})("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPreviousPage())}),l()()()}if(o&2){let n=d();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var re=(()=>{let r=class r{constructor(t,e,i,p,f,w){this.http=t,this.dialog=e,this.toastr=i,this.productService=p,this.activateRouter=f,this.authService=w,this.searchFilter=new Z,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=_.GuidEMpty,this.multipeScanChannels=[],this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(_.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.searchFilter=e.Filter,e.Filter.ChannelID!=_.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(e.Filter.ChannelID)),this.searchFilter.PageSize=e.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[z.Tokopedia,z.Tiktok])}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id};this.productService.findAllSoldInChannel(t).subscribe(e=>{this.products=e.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(t){let e=this.products[t].Variants;this.dialog.open(_t,{data:{variants:e,title:this.products[t].Name},width:"800px"})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe(y(e=>e)).subscribe(e=>{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(e,t,!this.searchFilter.UpdatedProduct),this.initPageLoader(_.GuidEMpty))})}onScanSingleProduct(t){t.Channel=this.productService.getChannelProduct(t);let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(D,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let p=this.productService.getVariantCodesProduct(t);this.scanProducts(p)})}onUploadToMultipleChannel(t){let e=this.productService.getChannelProduct(t);t.Channel=e;let i=this.productService.filterUnselectedChannel([t],this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:`Upload - ${t.Name}`,channels:i,product:t}}).afterClosed().pipe(y(p=>_.IsNotEmpty(p)),J(p=>this.productService.uploadSingleProduct([t],p))).subscribe({next:p=>{this.getProducts()}})}onScanMultipleProduct(){this.searchFilter.ChannelID=_.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(D,{data:{filter:t,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct;let p=this.productService.selectedProduct(this.products),f=this.productService.getVariantCodesProducts(p);this.scanProducts(f)})}scanProducts(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:e=>{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);e?this.toastr.success(`Product Successfully scan with ${i?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${i?.Name} `,"Error"),this.searchFilter.ChannelID=_.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=_.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}onClearFilterChannel(){this.searchFilter.ChannelID=_.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products),e=this.productService.filterUnselectedChannel(t,this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe(y(i=>_.IsNotEmpty(i)),J(i=>this.productService.uploadMultipleProduct(t,i))).subscribe({next:i=>{this.getProducts()}})}getRowCount(){let t={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text};this.http.post("/api/product/GetSoldInChannelRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Total})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(t){return _.getChannelLogoByTypeId(t)}};r.\u0275fac=function(e){return new(e||r)(x(B),x(G),x(R),x(U),x(mt),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-sold-in-channel"]],decls:18,vars:12,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"headerTitle","onSubmit"],[4,"ngIf"],[1,"fw-bold"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text","mt-2",3,"clearable","multiple","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],["class","mt-5",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"],[1,"mt-5"],["type","text","name","Item_id","id","Item_id",1,"form-control","mt-2",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,i){e&1&&(a(0,"mainpanel",0),g("onSubmit",function(f){return i.searchProduct(f)}),a(1,"actions"),S(2,Se,4,0,"ng-container",1)(3,xe,4,1,"ng-container",1)(4,Pe,4,1,"ng-container",1),l(),a(5,"filters")(6,"div")(7,"label",2),m(8,"Channel"),l(),a(9,"ng-select",3),g("ngModelChange",function(f){return i.searchFilter.ListChannelID=f})("clear",function(){return i.onClearFilterChannel()}),S(10,ve,3,2,"ng-template",4),l()(),S(11,be,4,1,"div",5),l(),a(12,"content")(13,"div",6)(14,"div",7),S(15,Ie,2,10,"div",8)(16,ye,3,0,"ng-container",1),l(),S(17,we,3,4,"div",9),l()()()),e&2&&(s("headerTitle","Sold in Channel"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(1),s("ngIf",i.multipeScanChannels.length>0&&i.productService.hasSelection(i.products)),c(1),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("multiple",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(2),s("ngIf",i.searchFilter.ListChannelID!=null),c(4),s("ngForOf",i.products),c(1),s("ngIf",i.products.length==0),c(1),s("ngIf",i.products==null?null:i.products.length))},dependencies:[N,E,et,$,j,V,H,nt,K,Y,A],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}"]});let o=r;return o})();function Oe(o,r){if(o&1){let n=P();a(0,"button",10),g("click",function(){u(n);let e=d(2);return h(e.uploadMultipleProduct())}),C(1,"i",11),m(2),l()}if(o&2){let n=d(2);c(2),I(" upload (",n.selectedProducts==null?null:n.selectedProducts.length,") ")}}function Fe(o,r){if(o&1){let n=P();v(0),a(1,"td",26)(2,"input",27),g("ngModelChange",function(e){u(n);let i=d(2).$implicit;return h(i.selected=e)})("ngModelChange",function(){u(n);let e=d(3).ngIf,i=d(3);return h(i.onSelectProduct(e))}),l()(),b()}if(o&2){let n=d(2).$implicit;c(1),s("rowSpan",n==null?null:n.Variants.length),c(1),s("ngModel",n.selected)}}function De(o,r){if(o&1){let n=P();v(0),a(1,"img",33),g("click",function(e){u(n);let i=d(3).$implicit,p=d(4);return h(p.onZoomImage(e,i==null?null:i.ImageUrl))}),l(),b()}if(o&2){let n=d(3).$implicit;c(1),s("src",n==null?null:n.ImageUrl,O)}}function Te(o,r){o&1&&C(0,"img",34)}function Ne(o,r){if(o&1&&(v(0),a(1,"td",26)(2,"div",28),S(3,De,2,1,"ng-container",7)(4,Te,1,0,"ng-template",null,29,tt),l()(),a(6,"td",30)(7,"h4",31)(8,"span",32),m(9),l()()(),b()),o&2){let n=L(5),t=d(2).$implicit;c(1),s("rowSpan",t==null?null:t.Variants.length),c(2),s("ngIf",t==null?null:t.ImageUrl)("ngIfElse",n),c(3),s("rowSpan",t==null?null:t.Variants.length),c(2),s("matTooltip",(t==null||t.Name==null?null:t.Name.length)>50?t==null?null:t.Name:""),c(1),I(" ",t==null?null:t.Name," ")}}function Ee(o,r){if(o&1&&(a(0,"div")(1,"a",22),C(2,"img",35),l()()),o&2){let n=r.$implicit;c(1),s("href",n.URL,O),c(1),s("src",n.Img,O)("matTooltip",n.Name)}}function ke(o,r){if(o&1&&(a(0,"div"),C(1,"img",35),l()),o&2){let n=r.$implicit;c(1),s("src",n.Img,O)("matTooltip",n.Name)}}function Ve(o,r){if(o&1&&(a(0,"tr"),S(1,Fe,3,2,"ng-container",9)(2,Ne,10,6,"ng-container",9),a(3,"td"),m(4),l(),a(5,"td")(6,"span"),m(7),l(),a(8,"span",21)(9,"a",22),C(10,"i",23),l()()(),a(11,"td",24)(12,"div",25),S(13,Ee,3,3,"div",20),l()(),a(14,"td",24)(15,"div",25),S(16,ke,2,2,"div",20),l()()()),o&2){let n=r.$implicit,t=r.index,e=d(5);c(1),s("ngIf",t==0),c(1),s("ngIf",t==0),c(2),I(" ",n.Name," "),c(3),I(" ",n.Code," "),c(2),s("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),O),c(4),s("ngForOf",n==null?null:n.Available),c(3),s("ngForOf",n==null?null:n.NotAvailable)}}function Ue(o,r){if(o&1&&(v(0),S(1,Ve,17,7,"tr",20),b()),o&2){let n=r.$implicit;c(1),s("ngForOf",n.Variants)}}function Ae(o,r){if(o&1&&(a(0,"tbody"),S(1,Ue,2,1,"ng-container",20),l()),o&2){let n=r.ngIf;c(1),s("ngForOf",n)}}function Le(o,r){if(o&1&&(v(0),a(1,"div",12)(2,"table",13)(3,"thead",14)(4,"tr"),C(5,"th",15),a(6,"th",16),m(7,"Product"),l(),a(8,"th",17),m(9,"Variant"),l(),a(10,"th",17),m(11,"SKU"),l(),a(12,"th",18),m(13,"Available In"),l(),a(14,"th",19),m(15,"Not Available In"),l()()(),S(16,Ae,2,1,"tbody",9),F(17,"async"),l()(),b()),o&2){let n=d(2);c(16),s("ngIf",T(17,1,n.data$))}}function Re(o,r){o&1&&(a(0,"div",36),C(1,"app-empty-state"),l())}function Be(o,r){if(o&1){let n=P();a(0,"span",44),g("click",function(){u(n);let e=d(4);return h(e.getRowCount())}),a(1,"i",45),m(2,"?"),l()()}}function $e(o,r){if(o&1&&(a(0,"span"),m(1),F(2,"number"),l()),o&2){let n=r.ngIf;c(1),st(T(2,1,n==null?null:n.Count))}}function je(o,r){if(o&1){let n=P();a(0,"a",46),g("click",function(){u(n);let e=d(4);return h(e.onNextPage())}),C(1,"i",47),m(2," Next"),l()}}function Ge(o,r){if(o&1){let n=P();a(0,"a",48),g("click",function(){u(n);let e=d(4);return h(e.onLastPage())}),C(1,"i",49),m(2," Last"),l()}}function Ke(o,r){if(o&1&&(v(0),a(1,"div",37)(2,"div",38)(3,"div",39),m(4),F(5,"number"),S(6,Be,3,0,"span",40)(7,$e,3,3,"span",9),F(8,"async"),m(9),l()(),a(10,"div",41),S(11,je,3,0,"a",42)(12,Ge,3,0,"a",43),l()(),b()),o&2){let n=d().ngIf,t=d(2);c(4),I(" Showing 1 - ",T(5,6,n==null?null:n.length)," of "),c(2),s("ngIf",t.paginationService.hideCount),c(1),s("ngIf",!t.paginationService.hideCount&&T(8,8,t.rowCount$)),c(2),I(" records ~ ",t.paginationService.footerPageNumber," Page "),c(2),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),c(1),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function Je(o,r){if(o&1&&(v(0),S(1,Ke,13,10,"ng-container",9),b()),o&2){let n=r.ngIf;c(1),s("ngIf",(n==null?null:n.length)>0)}}function ze(o,r){if(o&1){let n=P();a(0,"mainpanel",1),g("onSubmit",function(e){u(n);let i=d();return h(i.searchProduct(e))}),a(1,"actions"),S(2,Oe,3,1,"button",2),a(3,"button",3),g("click",function(){u(n);let e=d();return h(e.openScanDialog())}),C(4,"i",4),m(5," Scan Channel "),l()(),a(6,"content")(7,"div",5)(8,"div",6),S(9,Le,18,3,"ng-container",7),F(10,"async"),S(11,Re,2,0,"ng-template",null,8,tt),l(),S(13,Je,2,1,"ng-container",9),F(14,"async"),l()()()}if(o&2){let n=L(12),t=d(),e;s("hideSearchDropdown",!0),c(2),s("ngIf",t.hasSelectionProduct),c(7),s("ngIf",((e=T(10,5,t.data$))==null?null:e.length)>0)("ngIfElse",n),c(4),s("ngIf",T(14,7,t.data$))}}var ae=(()=>{let r=class r{constructor(t,e,i,p,f,w,yt){this.http=t,this.dialog=e,this.toastr=i,this.productService=p,this.paginationService=f,this.biggerPictureService=w,this.authService=yt,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.channelOptions=yt.getChannels(),this.hostName=this.authService.getDomain()}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe(Ot(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(Mt(t=>(t=t.map(e=>(e.Variants=e.Variants.map(i=>(i.Available=this.productService.sortChannel(i.Available),i.NotAvailable=this.productService.sortChannel(i.NotAvailable),i.Available=this.assignLogoChannel(i.Available),i.NotAvailable=this.assignLogoChannel(i.NotAvailable),i)),e)),t)))}assignLogoChannel(t){return t=t.map(e=>(e.Img=_.getChannelLogoByTypeId(e.TypeID),e)),t}searchProduct(t){this.filterSearch.text=t,this.paginationService.reloadPagination(this.filterSearch)}scanAllProduct(){let t=this.productService.findChannelById(this.filterSearch.ChannelID,this.channelOptions);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(e=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(e,t,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.filterSearch));t.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.filterSearch.ChannelID=i.ChannelID,this.filterSearch.ScanFull=i.ScanFull,this.filterSearch.UpdatedProduct=i.UpdatedProduct,this.filterSearch.Async=i.Async,this.scanAllProduct()})}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:t=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,t.Count)}})}onZoomImage(t,e){this.biggerPictureService.openBiggerPicture(t,e)}onSelectProduct(t){this.hasSelectionProduct=this.productService.hasSelection(t),this.selectedProducts=this.productService.selectedProduct(t)}uploadMultipleProduct(){let t=this.getUniqueChannels();t=t.map(e=>(e.ID=e.ChannelID,e)),this.dialog.open(q,{width:"700px",data:{title:"Upload Multiple Product",channels:t}}).afterClosed().pipe(y(e=>_.IsNotEmpty(e)),J(e=>{let i=this.getSelectedProductIds();return this.productService.uploadNotInChannel(i,e)})).subscribe({next:()=>{this.paginationService.reloadPagination(this.filterSearch),this.selectedProducts=[],this.hasSelectionProduct=!1},error:e=>{this.selectedProducts=[],this.hasSelectionProduct=!1}})}getSelectedProductIds(){return this.selectedProducts.map(e=>({ID:e.ProductID}))}getUniqueChannels(){let t=[];return this.selectedProducts.forEach(e=>{t=[...t,...e.Variants[0].NotAvailable]}),t=t.filter((e,i,p)=>p.findIndex(f=>f.ChannelID==e.ChannelID)==i),t}ngOnDestroy(){this.paginationService.destroy()}};r.\u0275fac=function(e){return new(e||r)(x(B),x(G),x(R),x(U),x(Xt),x(Ht),x(k))},r.\u0275cmp=M({type:r,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",""],[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,"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,i){e&1&&(S(0,ze,15,9,"mainpanel",0),F(1,"async")),e&2&&s("ngIf",T(1,1,i.loader$))},dependencies:[N,E,Ut,$,j,V,ht,A,pt,dt],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%}"]});let o=r;return o})();function He(o,r){if(o&1){let n=P();a(0,"button",14),g("click",function(){u(n);let e=d();return h(e.openScanDialog())}),C(1,"i",15),m(2," Scan Channel "),l()}}function Ze(o,r){if(o&1){let n=P();v(0),a(1,"button",16),g("click",function(){u(n);let e=d();return h(e.onDownloadAllProduct("SELECTED"))}),C(2,"i",17),m(3),l(),b()}if(o&2){let n=d(),t;c(3),I(" Download (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function qe(o,r){if(o&1&&(a(0,"span",18),C(1,"img",19),l(),m(2)),o&2){let n=r.item,t=d();c(1),s("src",t.getChannelLogo(n.TypeID),O),c(1),I(" ",n.Name," ")}}var Ye=o=>[o],Qe=()=>[];function We(o,r){if(o&1){let n=P();a(0,"div",20)(1,"app-product-card",21),g("onCheckBoxChange",function(e){let p=u(n).index,f=d();return h(f.onSelectProduct(e,p))})("onDescEvent",function(){let i=u(n).index,p=d();return h(p.onShowVariantDetail(i))})("onDownload",function(){let i=u(n).$implicit,p=d();return h(p.onDownloadProduct(i))})("onScan",function(){let i=u(n).$implicit,p=d();return h(p.onScanChannel(i))}),l()()}if(o&2){let n=r.$implicit;c(1),s("showRedirectIcon",!1)("title",n==null?null:n.Name)("image",n==null?null:n.Image)("imageForZoom",n==null?null:n.Image)("code",n==null?null:n.SKU)("description",(n==null||n.Variant==null?null:n.Variant.length)>0?(n==null||n.Variant==null?null:n.Variant.length)+" Variants":null)("downloadButton",!0)("channels",n!=null&&n.Channel?it(10,Ye,n==null?null:n.Channel):Q(12,Qe))("showCheckBox",!0)("scanButton",!0)}}function Xe(o,r){o&1&&(v(0),a(1,"div",22),C(2,"app-empty-state"),l(),b())}function tn(o,r){if(o&1){let n=P();a(0,"div",23)(1,"div",24)(2,"app-custom-paginator",25),g("total",function(){u(n);let e=d();return h(e.getRowCount())})("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPreviousPage())}),l()()()}if(o&2){let n=d();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var le=(()=>{let r=class r{constructor(t,e,i,p,f,w){this.http=t,this.dialog=e,this.productService=i,this.toastrService=p,this.activateRouter=f,this.authService=w,this.searchFilter=new Z,this.products=[],this.hasClickRowCount=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(_.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(t=>{this.products=t.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let t;this.products=this.products.map(e=>(t=this.channelOptions.find(i=>i.ID==e.ChannelID),t?e.Channel=JSON.parse(JSON.stringify(t)):e.Channel=null,e)).map(e=>(e.Channel&&(e.Channel.Url=e.Url),e))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?_.IsNotEmpty(t?.ChannelItemSKU)?t.SKU=t?.ChannelItemSKU:t.SKU="SKU not assigned":t.SKU=t?.Variant[0]?.ChannelVariationSKU?t?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",t))}onSearch(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=_.GuidEMpty}onScanAll(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{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(_.GuidEMpty),this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=_.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.Async=i.Async,this.onScanAll()})}onDownloadAllProduct(t){let e;t=="ALL"?e=this.products:e=this.productService.selectedProduct(this.products),e.length>0&&this.productService.downloadMultipleProduct(e).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,e){this.products[e].selected=t}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let e=JSON.parse(JSON.stringify(t));delete e.Channel,this.productService.scanCompareToPos([e]).subscribe(i=>{i.Status?(this.initPageLoader(_.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let e=this.products[t].Variant;e.length>0&&this.dialog.open(te,{data:{title:this.products[t].Name,variants:e},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Count})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(t){return _.getChannelLogoByTypeId(t)}};r.\u0275fac=function(e){return new(e||r)(x(B),x(G),x(U),x(R),x(mt),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-pos"]],decls:30,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,"fw-bold"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text","mt-2",3,"clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[1,"mt-5"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModel","ngModelChange"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",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,i){e&1&&(a(0,"mainpanel",0),g("onSubmit",function(f){return i.onSearch(f)}),a(1,"actions"),S(2,He,3,0,"button",1)(3,Ze,4,1,"ng-container",2),l(),a(4,"filters")(5,"div")(6,"label",3),m(7,"Channel"),l(),a(8,"ng-select",4),g("ngModelChange",function(f){return i.searchFilter.ChannelID=f})("clear",function(){return i.onClearChannelFilter()}),S(9,qe,3,2,"ng-template",5),l()(),a(10,"div",6)(11,"label",3),m(12,"SKU Assigned"),l(),a(13,"mat-radio-group",7),g("ngModelChange",function(f){return i.searchFilter.HaveSku=f}),a(14,"mat-radio-button",8),m(15," All "),l(),a(16,"mat-radio-button",8),m(17," Yes "),l(),a(18,"mat-radio-button",8),m(19," No "),l()()(),a(20,"div",6)(21,"label",3),m(22,"Item ID"),l(),a(23,"input",9),g("ngModelChange",function(f){return i.searchFilter.Item_id=f}),l()()(),a(24,"content")(25,"div",10)(26,"div",11),S(27,We,2,13,"div",12)(28,Xe,3,0,"ng-container",2),l(),S(29,tn,3,4,"div",13),l()()()),e&2&&(c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(1),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ChannelID),c(5),s("ngModel",i.searchFilter.HaveSku),c(1),s("value",0),c(2),s("value",1),c(2),s("value",2),c(5),s("ngModel",i.searchFilter.Item_id),c(4),s("ngForOf",i.products),c(1),s("ngIf",i.products.length==0),c(1),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[N,E,et,$,j,V,H,nt,Kt,Jt,K,Y,A],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}"]});let o=r;return o})();function en(o,r){if(o&1&&(a(0,"span",8),C(1,"img",9),l(),m(2)),o&2){let n=r.item,t=d();c(1),s("src",t.getChannelLogo(n.TypeID),O),c(1),I(" ",n.Name," ")}}function nn(o,r){if(o&1&&(a(0,"div",10),C(1,"app-duplicate-product-card",11),l()),o&2){let n=r.$implicit,t=r.index;c(1),s("imageForZoom",n.ImageUrl)("title",n.Name)("code",n.Code)("id",t)("image",n.ThumbnailURL)("channels",n.Channels)}}function on(o,r){o&1&&(v(0),a(1,"div",12),C(2,"app-empty-state"),l(),b())}function rn(o,r){if(o&1){let n=P();v(0),a(1,"div",13)(2,"div",14)(3,"app-custom-paginator",15),g("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPrevPage())})("total",function(){u(n);let e=d();return h(e.getRowCount())}),l()()(),b()}if(o&2){let n=d();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickedRowCount)}}var ce=(()=>{let r=class r{constructor(t,e,i){this.httpService=t,this.productService=e,this.authService=i,this.searchFilter=new Z,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader(),this.channelOptions=i.getChannels()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",t).subscribe(e=>{this.products=e.Data})}onSearch(t){this.searchFilter.text=t,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=_.GuidEMpty}getChannelLogo(t){return _.getChannelLogoByTypeId(t)}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(e=>{this.hasClickedRowCount=!0,this.rowCount=e.Total})}};r.\u0275fac=function(e){return new(e||r)(x(B),x(U),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-duplicate-sku"]],decls:14,vars:7,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["container",""],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text","mt-2",3,"multiple","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","id","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,i){e&1&&(a(0,"mainpanel",0),g("onSubmit",function(f){return i.onSearch(f)}),a(1,"filters")(2,"div",1)(3,"div")(4,"h6"),m(5,"Channel"),l(),a(6,"ng-select",2),g("ngModelChange",function(f){return i.searchFilter.ListChannelID=f})("clear",function(){return i.onClearFilter()}),S(7,en,3,2,"ng-template",3),l()()()(),a(8,"content")(9,"div",4)(10,"div",5),S(11,nn,2,6,"div",6)(12,on,3,0,"ng-container",7),l(),S(13,rn,4,4,"ng-container",7),l()()()),e&2&&(c(6),s("multiple",!0)("clearable",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(5),s("ngForOf",i.products),c(1),s("ngIf",(i.products==null?null:i.products.length)==0),c(1),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[N,E,$,j,V,H,nt,gt,K,A]});let o=r;return o})();function an(o,r){if(o&1&&(v(0),m(1),b()),o&2){let n=d().$implicit;c(1),I(" ",n.Count," ")}}function ln(o,r){if(o&1){let n=P();a(0,"span",26),g("click",function(){u(n);let e=d().$implicit,i=d(2);return h(i.getLiveProductCount(e.ID,e))}),C(1,"i",27),l()}}var cn=()=>["/menu/products/status/sold-in-channel"],se=o=>({ID:o}),sn=()=>["/menu/products/status/not-in-pos"];function pn(o,r){if(o&1){let n=P();a(0,"tr")(1,"td"),C(2,"img",16),a(3,"span",17),m(4),l()(),a(5,"td",18),S(6,an,2,1,"ng-container",4)(7,ln,2,0,"ng-template",null,19,tt),l(),a(9,"td",18)(10,"a",20),m(11),F(12,"number"),l()(),a(13,"td",18)(14,"a",20),m(15),F(16,"number"),l()(),a(17,"td"),m(18),F(19,"date"),l(),a(20,"td")(21,"div",21)(22,"button",22),g("click",function(){let i=u(n).$implicit,p=d(2);return h(p.onScanChannel(i))}),C(23,"i",23),m(24," Scan "),l(),a(25,"button",24),g("click",function(){let i=u(n).$implicit,p=d(2);return h(p.onClearCache(i.ID))}),C(26,"i",25),m(27," Clear "),l()()()()}if(o&2){let n=r.$implicit,t=L(8),e=d(2);c(2),s("src",e.getChannelLogo(n.TypeID),O),c(2),st(n.Name),c(2),s("ngIf",n.Count!==void 0)("ngIfElse",t),c(4),s("routerLink",Q(18,cn))("queryParams",it(19,se,n.ID)),c(1),I(" ",T(12,11,n.SoldInChannel)," "),c(3),s("routerLink",Q(21,sn))("queryParams",it(22,se,n.ID)),c(1),I(" ",T(16,13,n.NotInPOS)," "),c(3),I("",n.LastSync?Tt(19,15,n.LastSync,"dd MMM yyyy HH:mm"):"-"," ")}}function dn(o,r){if(o&1&&(v(0),a(1,"div",6)(2,"table",7)(3,"thead",8)(4,"tr",9)(5,"th"),m(6,"Channel"),l(),a(7,"th",10),m(8,"Live Product"),l(),a(9,"th",11),m(10,"Sold In Channel"),l(),a(11,"th",12),m(12,"Product Not in POS"),l(),a(13,"th",13),m(14,"Last Sync"),l(),C(15,"th",14),l()(),a(16,"tbody"),S(17,pn,28,24,"tr",15),F(18,"async"),l()()(),b()),o&2){let n=d(),t;c(17),s("ngForOf",(t=T(18,1,n.channels$))==null?null:t.Data)}}function mn(o,r){o&1&&(a(0,"div",28),C(1,"app-empty-state"),l())}var pe=(()=>{let r=class r{constructor(t,e,i,p){this.productService=t,this.toastr=e,this.dialog=i,this.authService=p,this.destroy$=new wt,this.channelOptions=p.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,e){this.productService.getTotalProductLive(t).pipe(Pt(this.destroy$)).subscribe(i=>{e.Count=i.Count})}onScanChannel(t){this.dialog.open(D,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:t.ID},disabledChannelOption:!0}}).afterClosed().pipe(y(e=>_.IsNotEmpty(e))).subscribe(e=>{this.scanAllProduct(t.ID,e)})}scanAllProduct(t,e){let i=this.productService.findChannelById(t,this.channelOptions);this.productService.scanAll(e.ChannelID,e.ScanFull,e.UpdatedProduct,e.Async).pipe(y(p=>p)).subscribe(p=>{e.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(p,i,!e.UpdatedProduct),this.setObsProductStatistic())})}onClearCache(t){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(t).pipe(Pt(this.destroy$)).subscribe(i=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(t){return _.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(e){return new(e||r)(x(U),x(R),x(G),x(k))},r.\u0275cmp=M({type:r,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,i){if(e&1&&(a(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3),S(5,dn,19,3,"ng-container",4),F(6,"async"),S(7,mn,2,0,"ng-template",null,5,tt),l()()()()()),e&2){let p=L(8),f;s("hideSearchBox",!0)("hideSearchDropdown",!0),c(5),s("ngIf",((f=T(6,4,i.channels$))==null||f.Data==null?null:f.Data.length)>0)("ngIfElse",p)}},dependencies:[N,E,V,ht,ut,A,pt,dt,Nt]});let o=r;return o})();var un=[{component:ne,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:oe,canActivate:[W],data:{title:"Products in POS"}},{path:"sold-in-channel",component:re,canActivate:[W],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:ae,canActivate:[W],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:le,canActivate:[W],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:ce,canActivate:[W],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:pe,canActivate:[W],data:{title:"Channel Statistic"}}]}],yi=(()=>{let r=class r{};r.\u0275fac=function(e){return new(e||r)},r.\u0275mod=Dt({type:r}),r.\u0275inj=Ft({imports:[Et,At,$t,Bt,Lt,ee,zt,Gt,gt,K,Y,Vt.forChild(un),Wt,Rt]});let o=r;return o})();export{yi as StatusModule};
|