1import{a as Re,b as Le}from"./chunk-D5MQXUOB.js";import{a as Ve,b as Ee}from"./chunk-RLYZADYW.js";import{a as Pe}from"./chunk-Q6IE2XGO.js";import{a as Te,b as De}from"./chunk-W3S2YV7L.js";import{a as Ae,b as Be}from"./chunk-NKIZKU65.js";import{d as ke}from"./chunk-XZCJ3WFQ.js";import{a as Ie}from"./chunk-YAV2OJ6L.js";import"./chunk-Z7L5EKOF.js";import"./chunk-RO5LHNL4.js";import"./chunk-YGISSRUE.js";import"./chunk-ZFWLU7Y6.js";import"./chunk-KMQOGOKI.js";import{b as ve}from"./chunk-3DQNXWNX.js";import"./chunk-XHSGA6JJ.js";import"./chunk-ASBGGFJV.js";import{b as Se}from"./chunk-3WC7F3NF.js";import"./chunk-XU3VMWWX.js";import"./chunk-TUNNLZGY.js";import{c as je,d as Me,e as be,g as we}from"./chunk-VOFNZ54N.js";import"./chunk-PBJRMICD.js";import{u as Fe}from"./chunk-CAT3XUNC.js";import"./chunk-DYRIJ3CI.js";import"./chunk-2TQN3MGM.js";import"./chunk-3XKXOQTO.js";import"./chunk-MMIGDUWD.js";import"./chunk-CJRK3T4L.js";import"./chunk-PK3V2R2H.js";import"./chunk-DTPC3DRJ.js";import"./chunk-PKPXIOLG.js";import"./chunk-XJRUUPIR.js";import"./chunk-7GEZUKAP.js";import"./chunk-YUMBIH6T.js";import"./chunk-MC4L25Z5.js";import"./chunk-ZZVADPAS.js";import{G as xe,k as Ce,p as fe,r as ge,ra as he,va as ye}from"./chunk-T4IDHORI.js";import"./chunk-UZCIA3XM.js";import"./chunk-75MZAZDJ.js";import"./chunk-S6YIDZD3.js";import"./chunk-ETOOYZXZ.js";import{f as de,g as ue}from"./chunk-2NPAOGKL.js";import{b as ce,f as me,j as pe,k as _e}from"./chunk-VIMXTOPS.js";import{a as E}from"./chunk-LW3GYOL2.js";import"./chunk-UV65SGCM.js";import"./chunk-WV5NZCWG.js";import"./chunk-XP7IAX7E.js";import"./chunk-7M7WYRAY.js";import"./chunk-GZTFORZ5.js";import"./chunk-TNAQQULJ.js";import"./chunk-3PRTE4PN.js";import"./chunk-NKUYZACS.js";import"./chunk-GZCRLJZM.js";import{D as le,b as Y,d as k,f as ee,g as te,h as ne,k as T,o as ie,t as ae,u as oe,w as re,x as se}from"./chunk-RCJTMARP.js";import{c as K,d as Q}from"./chunk-53DOX2OC.js";import"./chunk-GL5VAVUH.js";import{I as W,K as X,e as q,g as $}from"./chunk-OWD7JG7T.js";import{Ha as Z,Ka as J,g as H,l as O,p as U}from"./chunk-7LUFMYSS.js";import"./chunk-U4TFHOKU.js";import{$a as i,Cc as V,Dc as S,Ec as M,Jb as g,Jc as G,Kc as F,Lb as x,M as D,Qb as c,Rb as r,Sb as o,Tb as v,Tc as u,Uc as C,V as I,Yc as A,_b as j,cc as h,ec as
1s,ka as _,la as d,ob as R,oc as w,tb as L,tc as m,ub as N,uc as y,vc as b,wa as B,wc as z}from"./chunk-2HTR7ORR.js";import"./chunk-YDOPGCYI.js";import"./chunk-VTHXE323.js";var P=t=>({"subscription-required":t}),Ge=()=>({hideGrid:!0,hideRulers:!0,showTotalStock:!0,useTooltipAnalisis:!0});function He(t,l){if(t&1){let e=j();r(0,"catman-project-toolbar",22),h("refresh",function(){_(e);let a=s();return d(a._onRefreshClick())})("undo",function(){_(e);let a=s();return d(a._onUndoClick())}),o()}if(t&2){let e=s(),n=M(1);c("chain",n)("graph",e._graphic())("project",e._project)("undoDisabled",e._undoDisabled)("undoVisible",e._undo.length>1)("userId",e._userId)}}function Oe(t,l){if(t&1&&v(0,"catman-unread-comments-button",23),t&2){let e=s();c("project",e._project)("toolsFooter",e._toolsFooter())}}function Ue(t,l){if(t&1){let e=j();r(0,"button",29),h("click",function(){_(e);let a=s(2);return d(a._onBackClick())}),r(1,"mat-icon"),m(2,"keyboard_arrow_left"),o(),r(3,"span"),m(4),u(5,"translate"),o()()}if(t&2){let e=s(2);c("disabled",!e._project||!e._project.canEdit&&e._project.sharedMode===1),i(4),y(C(5,2,"button.back"))}}function qe(t,l){if(t&1&&(r(0,"span")(1,"strong"),m(2),u(3,"translate"),o(),m(4),o()),t&2){s(2);let e=M(7);i(2),b("",C(3,2,"corporate.sales.analysis.clusters"),":"),i(2),b(" ",e.clusters.join(", "))}}function $e(t,l){if(t&1&&(r(0,"span")(1,"strong"),m(2),u(3,"translate"),o(),m(4),o()),t&2){s(2);let e=M(7);i(2),b("",C(3,2,"corporate.sales.analysis.stores"),":"),i(2),b(" ",e.stores.join(", "))}}function Ze(t,l){if(t&1&&(r(0,"span")(1,"strong"),m(2),u(3,"translate"),o(),m(4),o()),t&2){s(2);let e=M(7);i(2),b("",C(3,3,"corporate.sales.analysis.dates"),":"),i(2),z(" ",e.startDate," \u2014 ",e.endDate)}}function Je(t,l){if(t&1&&(r(0,"div",42),g(1,qe,5,4,"span"),g(2,$e,5,4,"span"),g(3,Ze,5,5,"span"),o()),t&2){s();let e=M(7);i(),x(e.clusters!=null&&e.clusters.length?1:-1),i(),x(e.stores!=null&&e.stores.length?2:-1),i(),x(e.startDate||e.endDate?3:-1)}}function Ke(t,l){t&1&&v(0,"catman-loader",40),t&2&&c("size",24)}function Qe(t,l){t&1&&(m(0),u(1,"translate")),t&2&&b(" ",C(1,1,"corporate.sales.analysis.select")," ")}function We(t,l){if(t&1){let e=j();r(0,"mat-expansion-panel",30)(1,"mat-expansion-panel-header",31)(2,"mat-panel-title"),m(3),u(4,"translate"),o()(),r(5,"div",32)(6,"div"),V(7),g(8,Je,4,3,"div",42),o(),r(9,"button",43),h("click",function(){_(e);let a=s(3);return d(a._onSalesDataClick())}),g(10,Ke,1,1,"catman-loader",40)(11,Qe,2,3),o()()()}if(t&2){let e=s(3),n=M(0);i(3),y(C(4,6,"corporate.sales.analysis-title")),i(2),c("formGroup",e._options),i(2);let a=S(e._salesConfig());i(),x(a&&a.mode===1?8:-1),i(),c("ngClass",F(9,P,!n["project.sales.data.store"]))("disabled",e._loading),i(),x(e._loading?10:11)}}function Xe(t,l){t&1&&v(0,"catman-loader",40),t&2&&c("size",24)}function Ye(t,l){t&1&&(m(0),u(1,"translate")),t&2&&b(" ",C(1,1,"project.analysis.startButton")," ")}function et(t,l){if(t&1){let e=j();g(0,We,12,11,"mat-expansion-panel",30),v(1,"catman-analysis-type",16),r(2,"mat-expansion-panel",30)(3,"mat-expansion-panel-header",31)(4,"mat-panel-title"),m(5),u(6,"translate"),o()(),r(7,"div",32)(8,"mat-form-field",33)(9,"mat-label"),m(10),u(11,"translate"),o(),v(12,"input",34),r(13,"span",35),m(14),u(15,"translate"),o()(),r(16,"mat-form-field",33)(17,"mat-label"),m(18),u(19,"translate"),o(),r(20,"mat-select",36)(21,"mat-option",37),m(22),u(23,"translate"),o(),r(24,"mat-option",37),m(25),u(26,"translate"),o(),r(27,"mat-option",37),m(28),u(29,"translate"),o(),r(30,"mat-option",37),m(31),u(32,"translate"),o()()(),r(33,"mat-form-field",33)(34,"mat-label"),m(35),u(36,"translate"),o(),v(37,"input",38),r(38,"span",35),m(39,"%"),o()(),r(40,"button",39),h("click",function(){_(e);let a=s(2);return d(a._doAnalysis())}),g(41,Xe,1,1,"catman-loader",40)(42,Ye,2,3),o()()(),r(43,"button",41),h("click",function(){_(e);let a=s(2);return d(a._onSalesEditClick())}),r(44,"mat-icon"),m(45,"edit"),o(),r(46,"span"),m(47),u(48,"translate"),o()()}if(t&2){let e=s(2),n=M(0);x(e._hasCorporate()&&n["project.sales.data.store"]?0:-1),i(),c("project",e._project),i(4),y(C(6,22,"project.analysis.fronts")),i(2),c("formGroup",e._options),i(3),y(C(11,24,"project.analysis.fronts.rythm")),i(4),y(C(15,26,"project.analysis.fronts.days")),i(4),y(C(19,28,"project.analysis.fronts.sales-data")),i(3),c("value",1),i(),y(C(23,30,"project.analysis.fronts.sales-day")),i(2),c("value",7),i(),y(C(26,32,"project.analysis.fronts.sales-week")),i(2),c("value",30),i(),y(C(29,34,"project.analysis.fronts.sales-month")),i(2),c("value",365),i(),y(C(32,36,"project.analysis.fronts.sales-year")),i(4),y(C(36,38,"project.analysis.fronts.margin")),i(5),c("disabled",e._options.invalid||e._loading)("ngClass",F(42,P,!n["project.analysis.fronts"])),i(),x(e._loading?41:42),i(2),c("disabled",!e._project||!e._project.canEdit&&e._project.sharedMode===1)("ngClass",F(44,P,!n["project.sales-data"])),i(4),y(C(48,40,"project.sales.edit"))}}function tt(t,l){if(t&1&&(r(0,"catman-viewport")(1,"div",24),v(2,"catman-project-view-header",25),o(),r(3,"div",13)(4,"div",26),g(5,Ue,6,4,"button",27)(6,et,49,46),o()(),r(7,"div",18),v(8,"catman-project-view-footer",28,6),o()()),t&2){let e=s(),n=M(1),a=M(2);i(2),c("chain",n)("project",e._project)("view",3),i(3),x(a?5:6),i(3),c("isAmbassad
1or",e._isAmbassadorProject)("project",e._project)("showGrid",!1)("showRulers",!1)("showSkus",!0)("showUnits",!1)}}function nt(t,l){t&1&&(r(0,"div",15),v(1,"catman-loader"),o())}function it(t,l){if(t&1){let e=j();r(0,"catman-project-sales-data",44,7),h("changed",function(){_(e);let a=s();return d(a._onChange())})("changedSales",function(){_(e);let a=s();return d(a._onChangeSales())})("salesDelete",function(){_(e);let a=s();return d(a._onSalesDeleteAllClick())})("productDelete",function(){_(e);let a=s();return d(a._onProductDeleteAllClick())}),o()}if(t&2){let e=s();c("project",e._project)}}function at(t,l){if(t&1){let e=j();r(0,"catman-rack-graphic",45,8),h("changed",function(){_(e);let a=s();return d(a._onChange())})("deleted",function(a){_(e);let p=s();return d(p._onProductDelete(a))})("facingsChanged",function(a){_(e);let p=s();return d(p._onProductFacingsChanged(a))})("productDrop",function(a){_(e);let p=s();return d(p._onProductDrop(a))})("undo",function(){_(e);let a=s();return d(a._onUndoClick())}),o()}if(t&2){let e=s(),n=w(21),a=w(23);c("alignmentMenu",n.menu())("canSelectSections",!1)("displaySettings",G(12,Ge))("dropTarget",!0)("frontsAnalysis",e._analysisResult)("height",e._project.rack.size.h)("productCodeShow",e._productCodeShow)("productContextMenu",a)("libraryProductColor",e._libraryProductColor)("project",e._project)("ribbon",e._ribbon())("width",e._project.rack.size.w)}}function ot(t,l){if(t&1){let e=j();r(0,"div",18)(1,"div",46)(2,"catman-product-ribbon",47,9),h("productChanged",function(){_(e);let a=s();return d(a._onChange())}),o()()()}if(t&2){let e=s();i(2),c("disabled",!e._project||!e._project.canEdit)("project",e._project)}}function rt(t,l){if(t&1){let e=j();r(0,"div",18)(1,"catman-project-comments",48,10),h("hover",function(a){_(e);let p=s();return d(p._productCodeShow=a)}),o()()}if(t&2){let e=s(),n=M(1);i(),c("isChain",(e._project==null?null:e._project.id)===n)("projectId",e._project==null?null:e._project.id)}}function st(t,l){if(t&1){let e=j();r(0,"div",19)(1,"div",49)(2,"catman-help",50),u(3,"async"),h("_close",function(){_(e);let a=s();return d(a._onClose())}),o()()()}if(t&2){let e=s();i(2),c("_data",C(3,2,e._helpText$))("_isModal",!1)}}function lt(t,l){if(t&1&&v(0,"catman-total-skus",16),t&2){let e=s();c("project",e._project)}}var Ne=class t extends Re{_editProjectData=B(!1);_options=new ne({margin:new T(void 0),salesPeriod:new T(void 0),rhythm:new T(void 0,[k.required,k.min(0)])});_analysisResult;_hasAnalysisResult(){return!!this._analysisResult}constructor(){super(),this._options.controls.salesPeriod.valueChanges.pipe(E()).subscribe({next:l=>{this._project&&(this._project.periodDays=l,this._onChange())}})}ngOnInit(){super.ngOnInit(),this._helpService.load("analysis"),this._helpService.showHelpPanel&&(this._helpText$=this._helpService.getHelpText())}_doAnalysis(){this._loading=!0,this._canUse("project.analysis.fronts").pipe(I(()=>this._analysisApi.facings(this._project.id,this._options.value.rhythm,this._options.value.salesPeriod||1,this._options.value.margin)),E(this._destroyRef),D(()=>{this._loading=!1,this._changeDetectorRef.markForCheck()})).subscribe({next:l=>this._analysisResult=l,error:l=>this._dialogsService.showErrorSnackbar(l)})}_onBackClick(){this._editProjectData.set(!1),this._refresh()}_onResetAnalytics(){this._refresh()}_onSalesEditClick(){this._canUse("project.sales-data",this._project.id).subscribe({next:()=>this._editProjectData.set(!0)})}_projectLoaded(){this._refresh()}_refresh(){setTimeout(()=>{this._project&&(this._options.controls.rhythm.setValue(this._project.frontsRhythm,{emitEvent:!1}),this._options.controls.margin.setValue(this._project.frontsMargin,{emitEvent:!1}),this._options.controls.salesPeriod.setValue(this._project.periodDays||1,{emitEvent:!1}))},700)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=R({type:t,selectors:[["catman-minimum-facings-analysis"]],features:[L],decls:25,vars:10,consts:[["header","cdkPortal"],["commentsHeader","cdkPortal"],["toolbar","cdkPortal"],["content",""],["alignmentMenu",""],["productContextMenu",""],["toolsFooter",""],["salesData",""],["graphic",""],["ribbon",""],["comments",""],["cdkPortal",""],["direction","horizontal"],["catman-viewport-content",""],["catman-viewport-content","",3,"pan","pinch","pinchend","pinchstart","wheel"],[1,"flex","h-full","items-center","justify-center","pt-8"],[3,"project"],[3,"alignmentMenu","canSelectSections","displaySettings","dropTarget","frontsAnalysis","height","productC
1odeShow","productContextMenu","libraryProductColor","project","ribbon","width"],["catman-viewport-footer",""],["catman-viewport-footer","",1,"h-full","w-[30%]","overflow-auto"],[3,"aligned"],[3,"addComment","changed","deleted","facingsChanged","productCopy","salesDataChanged","alignmentMenu","project"],[3,"refresh","undo","chain","graph","project","undoDisabled","undoVisible","userId"],[3,"project","toolsFooter"],["catman-viewport-header",""],[3,"chain","project","view"],[1,"flex","flex-col","items-stretch","gap-2","px-2"],["color","white","mat-flat-button","",1,"!justify-start","!font-medium",3,"disabled"],[3,"isAmbassador","project","showGrid","showRulers","showSkus","showUnits"],["color","white","mat-flat-button","",1,"!justify-start","!font-medium",3,"click","disabled"],["expanded","true"],["collapsedHeight","36px","expandedHeight","36px"],[1,"mb-2","flex","flex-col","justify-stretch","gap-3",3,"formGroup"],["subscriptSizing","dynamic"],["formControlName","rhythm","matInput","","min","0","required","","type","number",2,"text-align","right"],["matTextSuffix",""],["formControlName","salesPeriod"],[3,"value"],["formControlName","margin","matInput","","min","0","required","","type","number",2,"text-align","right"],["color","primary","mat-flat-button","",3,"click","disabled","ngClass"],[3,"size"],["color","white","mat-flat-button","",1,"!justify-start","!font-medium",3,"click","disabled","ngClass"],[1,"flex","flex-col","gap-1","text-xs"],["color","primary","mat-flat-button","",3,"click","ngClass","disabled"],[3,"changed","changedSales","salesDelete","productDelete","project"],[3,"changed","deleted","facingsChanged","productDrop","undo","alignmentMenu","canSelectSections","displaySettings","dropTarget","frontsAnalysis","height","productCodeShow","productContextMenu","libraryProductColor","project","ribbon","width"],[1,"h-[100px]"],[3,"productChanged","disabled","project"],[3,"hover","isChain","projectId"],[1,"size-full","overflow-hidden","ps-2"],[1,"help-panel","inline-block","size-full",3,"_close","_data","_isModal"]],template:function(e,n){if(e&1){let a=j();V(0)(1)(2),N(3,He,1,6,"ng-template",11,0,A)(5,Oe,1,2,"ng-template",11,1,A)(7,tt,10,10,"ng-template",11,2,A),r(9,"catman-viewport",12)(10,"div",13)(11,"catman-viewport")(12,"div",14,3),h("pan",function(f){_(a);let ze=w(13);return d(n._onPan(f,ze))})("pinch",function(f){return n._onPinch(f)})("pinchend",function(){return n._onPinchEnd()})("pinchstart",function(f){return n._onPinchStart(f)})("wheel",function(f){return n._onZoom(f)}),g(14,nt,2,0,"div",15)(15,it,2,1,"catman-project-sales-data",16)(16,at,2,13,"catman-rack-graphic",17),o(),g(17,ot,4,2,"div",18),o()(),g(18,rt,3,2,"div",18),g(19,st,4,4,"div",19),o(),r(20,"catman-shelf-align-context-menu",20,4),h("aligned",function(f){return n._onAlignChanged(f)}),o(),r(22,"catman-product-context-menu",21,5),h("addComment",function(f){return n._onAddComment(f)})("changed",function(){return n._onChange()})("deleted",function(f){return n._onProductDelete(f)})("facingsChanged",function(f){return n._onProductFacingsChanged(f)})("productCopy",function(f){return n._onProductCopy(f)}
1)("salesDataChanged",function(){return n._onSalesDataChanged()}),o(),g(24,lt,1,1,"catman-total-skus",16)}if(e&2){let a=w(21);S(n._allowedFunctionality()),i(),S(n._chain()),i();let p=S(n._editProjectData());i(12),x(n._project?p?15:16:14),i(3),x(!n._fullscreen.isFullscreen&&n._project&&!p?17:-1),i(),x(n._projectOptionsService.comments()&&n._project?18:-1),i(),x(n._helpService.showHelpPanel&&n._project?19:-1),i(3),c("alignmentMenu",a.menu())("project",n._project),i(2),x(n._projectOptionsService.skus?24:-1)}},dependencies:[Le,xe,Ae,Be,Te,Fe,Ve,De,Ie,ke,he,Ee,Pe,U,H,J,Z,we,je,Me,be,_e,pe,ce,me,Q,K,ue,de,Se,$,q,le,Y,ie,ee,te,se,re,oe,ae,X,ye,ge,fe,Ce,ve,O,W],encapsulation:2})};export{Ne as CatmanMinimunFacingsAnalysisComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.