PageSourceSearch

https://app.leadgenic.ru/chunk-64LQSJD6.js

js leadgenic.ru collected 2026-10-04 00:19:43 UTC 35,014 bytes, 3 lines download raw bytes

1import{a as E}from"./chunk-3Y2TDSQR.js";import{f as _t}from"./chunk-UBTWKSJC.js";import{a as ht}from"./chunk-XN54DTSZ.js";import{a as St}from"./chunk-N64MUBIE.js";import{m as Ct,n as gt}from"./chunk-YO4EDRJ7.js";import"./chunk-5KUSON4V.js";import{a as ut,b as mt}from"./chunk-MIK4VLE4.js";import{$ as M,$a as s,Fc as L,Gb as l,Hb as c,Ic as N,Ka as X,La as _,Ma as Y,Na as h,Nb as et,O as q,Ob as nt,Pa as Z,Pc as z,Q as J,Qa as tt,Ra as d,Rc as at,Sa as p,Ta as i,Tb as ot,Ua as C,V as K,W as k,Ya as O,Yb as it,Z as b,_ as f,_a as x,_c as pt,a as R,ad as lt,ed as W,f as yt,fa as Q,fd as V,gd as ct,hd as A,ib as U,id as rt,k as F,lb as u,ma as P,mb as m,nb as B,od as dt,pd as st,qb as w,ra as o,rb as v,rc as G,sb as y,tb as S,ya as T,yb as j,za as D}from"./chunk-UPWIJIG3.js";var ft=e=>({active:e});function Bt(e,g){e&1&&(p(0,"h3",2),u(1),l(2,"translate"),i()),e&2&&(o(),m(c(2,1,"coupons.modal.newCoupon.title")))}function Vt(e,g){e&1&&(p(0,"h3",2),u(1),l(2,"translate"),i()),e&2&&(o(),m(c(2,1,"coupons.modal.editCoupon.title")))}function At(e,g){if(e&1&&C(0,"h5",3),e&2){let t=s();d("innerHTML",t.couponTypeLabel,P)}}function It(e,g){if(e&1){let t=O();p(0,"div",7)(1,"h5"),u(2),l(3,"translate"),i(),p(4,"div",11)(5,"span",12),x("click",function(){f(t);let n=s();return M(n.setCouponType("SINGABLE"))}),u(6),l(7,"translate"),i(),p(8,"span",12),x("click",function(){f(t);let n=s();return M(n.setCouponType("REUSABLE"))}),u(9),l(10,"translate"),i()()()}if(e&2){let t=s();o(2),m(c(3,5,"coupons.modal.newCoupon.description")),o(3),d("ngClass",j(11,ft,t.isCurrentActiveCouponType("SINGABLE"))),o(),m(c(7,7,"coupons.modal.newCoupon.tab1.title")),o(2),d("ngClass",j(13,ft,t.isCurrentActiveCouponType("REUSABLE"))),o(),m(c(10,9,"coupons.modal.newCoupon.tab2.title"))}}function kt(e,g){e&1&&(C(0,"h6",3),l(1,"translate")),e&2&&d("innerHTML",c(1,1,"coupons.modal.newCoupon.tab1.desc"),P)}function Dt(e,g){e&1&&(C(0,"span",16),l(1,"translate")),e&2&&d("innerHTML",c(1,1,"coupons.modal.newCoupon.code.desc"),P)}function Lt(e,g){if(e&1){let t=O();p(0,"div",8),_(1,kt,2,3,"h6",3),p(2,"div",13)(3,"label",14),u(4),l(5,"translate"),i(),p(6,"input",15),y("ngModelChange",function(n){f(t);let r=s();return v(r.editableCoupon.name,n)||(r.editableCoupon.name=n),M(n)}),i(),C(7,"span",16),l(8,"translate"),i(),p(9,"div",13)(10,"label",17),u(11),l(12,"translate"),i(),p(13,"input",18),y("ngModelChange",function(n){f(t);let r=s();return v(r.editableCoupon.code,n)||(r.editableCoupon.code=n),M(n)}),i(),_(14,Dt,2,3,"span",16),i(),p(15,"div",13)(16,"label",19),u(17),l(18,"translate"),i(),p(19,"input",20),y("ngModelChange",function(n){f(t);let r=s();return v(r.editableCoupon.defaultValue,n)||(r.editableCoupon.defaultValue=n),M(n)}),i(),C(20,"span",16),l(21,"translate"),i()()}if(e&2){let t=s();o(),h(t.currentCoupon?-1:1),o(3),m(c(5,11,"coupons.modal.newCoupon.name.title")),o(2),w("ngModel",t.editableCoupon.name),o(),d("innerHTML",c(8,13,"coupons.modal.newCoupon.name.desc"),P),o(4),m(c(12,15,"coupons.modal.newCoupon.code.title")),o(2),w("ngModel",t.editableCoupon.code),d("disabled",t.currentCoupon),o(),h(t.currentCoupon?-1:14),o(3),m(c(18,17,"coupons.modal.newCoupon.value.title")),o(2),w("ngModel",t.editableCoupon.defaultValue),o(),d("innerHTML",c(21,19,"coupons.modal.newCoupon.value.desc"),P)}}function Nt(e,g){e&1&&(C(0,"h6",3),l(1,"translate")),e&2&&d("innerHTML",c(1,1,"coupons.modal.newCoupon.tab2.desc"),P)}function zt(e,g){e&1&&(C(0,"span",25),l(1,"translate")),e&2&&d("innerHTML",c(1,1,"coupons.modal.newCoupon.code.desc"),P)}function Wt(e,g){if(e&1){let t=O();p(0,"div",13)(1,"label",34),u(2),l(3,"translate"),i(),p(4,"input",35),y("ngModelChange",function(n){f(t);let r=s(2);return v(r.editableCoupon.defaultValue,n)||(r.editableCoupon.defaultValue=n),M(n)}),i(),C(5,"span",16),l(6,"translate"),i()}if(e&2){let t=s(2);o(2),m(c(3,3,"coupons.modal.newCoupon.value.title")),o(2),w("ngModel",t.editableCoupon.defaultValue),o(),d("innerHTML",c(6,5,"coupons.modal.newCoupon.value.desc"),P)}}function Ht(e,g){if(e&1){let t=O();p(0,"div",8),_(1,Nt,2,3,"h6",3),p(2,"div",13)(3,"label",21),u(4),l(5,"translate"),i(),p(6,"input",22),y("ngModelChange",function(n){f(t);let r=s();return v(r.editableCoupon.name,n)||(r.editableCoupon.name=n),M(n)}),i(),C(7,"span",16),l(8,"translate"),i(),p(9,"div",13)(10,"label",23),u(11),l(12,"translate"),i(),p(13,"input",24),y("ngModelChange",function(n){f(t);let r=s();return v(r.editableCoupon.code,n)||(r.editableCoupon.code=n),M(n)}),i(),_(14,zt,2,3,"span",25),i(),p(15,"div",13)(16,"label",26),u(17),l(18,"translate"),i(),p(19,"textarea",27),y("ngModelChange",function(n){f(t);let r=s();return v(r.tags,n)||(r.tags=n),M(n)}),i(),C(20,"span",16),l(21,"translate"),i(),p(22,"div",28)(23,"ui-switch",29),y("ngModelChange",function(n){f(t);let r=s();return v(r.editableCoupon.needUseDefault,n)||(r.editableCoupon.needUseDefault=n),M(n)}),i(),p(24,"label",30),u(25),l(26,"translate"),i()(),_(27,Wt,7,7,"div",13),p(28,"div",13)(29,"label",31),u(30),l(31,"translate"),C(32,"a",32),l(33,"translate"),i(),p(34,"input",33),y("ngModelChange",function(n){f(t);let r=s();return v(r.editableCoupon.notificationThreshold,n)||(r.editableCoupon.notificationThreshold=n),M(n)}),i(),C(35,"span",16),l(36,"translate"),i()()}if(e&2){let t=s();o(),h(t.currentCoupon?-1:1),o(3),m(c(5,19,"coupons.modal.newCoupon.name.title")),o(2),w("ngModel",t.editableCoupon.name),o(),d("innerHTML",c(8,21,"coupons.modal.newCoupon.name.de
1sc"),P),o(4),m(c(12,23,"coupons.modal.newCoupon.code.title")),o(2),w("ngModel",t.editableCoupon.code),d("disabled",t.currentCoupon),o(),h(t.currentCoupon?-1:14),o(3),m(c(18,25,"coupons.modal.newCoupon.tab2.list.title")),o(2),w("ngModel",t.tags),o(),d("innerHTML",c(21,27,"coupons.modal.newCoupon.tab2.list.desc"),P),o(3),w("ngModel",t.editableCoupon.needUseDefault),o(2),m(c(26,29,"coupons.modal.newCoupon.tab2.needDefault.title")),o(2),h(t.editableCoupon.needUseDefault?27:-1),o(3),B(" ",c(31,31,"coupons.modal.newCoupon.tab2.threshold.title")," "),o(2),d("title",S(c(33,33,"coupons.modal.newCoupon.tab2.threshold.desc1"))),o(2),w("ngModel",t.editableCoupon.notificationThreshold),o(),d("innerHTML",c(36,35,"coupons.modal.newCoupon.tab2.threshold.desc2"),P)}}function Ut(e,g){if(e&1){let t=O();p(0,"button",36),x("click",function(){f(t);let n=s();return M(n.createCoupon())}),u(1),l(2,"translate"),i()}if(e&2){let t=s();d("disabled",!t.editableCoupon.code||!t.editableCoupon.name||!t.editableCoupon.defaultValue),o(),B(" ",c(2,2,"coupons.addCoupon")," ")}}function jt(e,g){if(e&1){let t=O();p(0,"button",36),x("click",function(){f(t);let n=s();return M(n.createCoupon())}),u(1),l(2,"translate"),i()}if(e&2){let t=s();d("disabled",!t.editableCoupon.code||!t.editableCoupon.name||t.editableCoupon.notificationThreshold===null||t.editableCoupon.needUseDefault&&!t.editableCoupon.defaultValue||!t.tags.length),o(),B(" ",c(2,2,"coupons.addCoupon")," ")}}function Gt(e,g){if(e&1){let t=O();p(0,"button",36),x("click",function(){f(t);let n=s();return M(n.createCoupon())}),u(1),l(2,"translate"),i()}if(e&2){let t=s();d("disabled",!t.editableCoupon.code||!t.editableCoupon.name||!t.editableCoupon.defaultValue),o(),B(" ",c(2,2,"coupons.modal.newCoupon.tab2.save")," ")}}function Rt(e,g){if(e&1){let t=O();p(0,"button",36),x("click",function(){f(t);let n=s();return M(n.createCoupon())}),u(1),l(2,"translate"),i()}if(e&2){let t=s();d("disabled",!t.editableCoupon.code||!t.editableCoupon.name||t.editableCoupon.notificationThreshold===null||t.editableCoupon.needUseDefault&&!t.editableCoupon.defaultValue||!t.tags.length),o(),B(" ",c(2,2,"coupons.modal.newCoupon.tab2.save")," ")}}var xt=(()=>{class e{constructor(){this.translate=b(W),this.activeModal=b(dt),this.utilsService=b(ht),this.couponService=b(E),this.tags=""}ngOnInit(){this.currentCoupon?(this.currentActiveCouponType=this.currentCoupon.type,this.couponTypeLabel=this.currentCoupon.type==="REUSABLE"?this.translate.instant("coupons.modal.newCoupon.tab2.title"):this.translate.instant("coupons.modal.newCoupon.tab1.title"),this.editableCoupon=R({},this.currentCoupon),this.currentActiveCouponType==="REUSABLE"&&(this.tags=this.mappedCoupons(this.editableCoupon.values))):(this.currentActiveCouponType="SINGABLE",this.editableCoupon={name:"",code:this.utilsService.generateShortID(),value:"",needUseDefault:!1,notificationThreshold:10})}ngAfterViewChecked(){$('[data-toggle="tooltip"]')?.tooltip({trigger:"hover"})}setCouponType(t){this.currentActiveCouponType=t,this.editableCoupon.type=t}isCurrentActiveCouponType(t){return this.currentActiveCouponType===t}closeModal(t){this.activeModal.close(t)}createCoupon(){let t={name:this.editableCoupon.name,code:this.editableCoupon.code,type:this.currentActiveCouponType,defaultValue:this.editableCoupon.defaultValue,values:null,needUseDefault:null,notificationThreshold:null};this.currentActiveCouponType==="REUSABLE"&&(t.values=this.unmappedCoupons(this.tags),t.needUseDefault=this.editableCoupon.needUseDefault,t.notificationThreshold=this.editableCoupon.notificationThreshold,this.editableCoupon.needUseDefault||delete t.defaultValue),this.currentCoupon?this.couponService.updateCoupon(this.currentCoupon.id,t).subscribe(a=>{a&&this.closeModal(a)}):this.couponService.createCoupon(t).subscribe(a=>{a&&this.closeModal(a)})}unmappedCoupons(t){return t.split(`
2`)}mappedCoupons(t){return t.join(`
3`)}static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275cmp=T({type:e,selectors:[["app-coupon-add"]],inputs:{currentCoupon:"currentCoupon"},standalone:!1,decls:16,vars:10,consts:[[1,"modal-header"],[1,"d-flex","flex-column"],[1,"modal-title"],[3,"innerHTML"],[1,"close","btn",3,"click"],["inlineSVG","/assets/images/core/cross.svg"],[1,"modal-body"],[1,"coupon-switcher-wr"],[1,"coupon-tab"],[1,"form-buttons"],[1,"btn","btn-success",3,"disabled"],[1,"btn-group"],[1,"btn","btn-default",3,"click","ngClass"],[1,"coupon-tab-item"],["for","name",1,"control-label"],["id","name","name","name","type","text",1,"form-control",3,"ngModelChange","ngModel"],[1,"small",3,"innerHTML"],["for","code",1,"control-label"],["id","code","name","name","type","text",1,"form-control",3,"ngModelChange","ngModel","disabled"],["for","defaultValue",1,"control-label"],["id","defaultValue","name","name","type","text",1,"form-control",3,"ngModelChange","ngModel"],["for","name2",1,"control-label"],["id","name2","name","name","type","text",1,"form-control",3,"ngModelChange","ngModel"],["for","code2",1,"control-label"],["id","code2","name","name","type","text",1,"form-control",3,"ngModelChange","ngModel","disabled"],[1,"small","mt-3",3,"innerHTML"],["for","tags",1,"control-label"],["id","tags","rows","5","type","text",1,"form-control",3,"ngModelChange","ngModel"],[1,"coupon-tab-item","d-flex","align-items-center"],["size","small",1,"align-self-start",3,"ngModelChange","ngModel"],[1,"control-label","switcher-label-xs","control-label-des","mt-1","ml-2"],["for","notificationThreshold",1,"control-label","d-flex"],["data-placement","top","data-toggle","tooltip","inlineSVG","/assets/images/core/question.svg",1,"info-link",3,"title"],["id","notificationThreshold","name","name","type","number",1,"form-control",3,"ngModelChange","ngModel"],["for","defaultValue2",1,"control-label"],["id","defaultValue2","name","name","type","text",1,"form-control",3,"ngModelChange","ngModel"],[1,"btn","btn-success",3,"click","disabled"]],template:function(a,n){a&1&&(p(0,"div",0)(1,"div",1),_(2,Bt,3,3,"h3",2),_(3,Vt,3,3,"h3",2),_(4,At,1,1,"h5",3),i(),p(5,"button",4),x("click",function(){return n.closeModal()}),C(6,"span",5),i()(),p(7,"div",6),_(8,It,11,15,"div",7),_(9,Lt,22,21,"div",8),_(10,Ht,37,37,"div",8),p(11,"div",9),_(12,Ut,3,4,"button",10),_(13,jt,3,4,"button",10),_(14,Gt,3,4,"button",10),_(15,Rt,3,4,"button",10),i()()),a&2&&(
3o(2),h(n.currentCoupon?-1:2),o(),h(n.currentCoupon?3:-1),o(),h(n.currentCoupon?4:-1),o(4),h(n.currentCoupon?-1:8),o(),h(n.isCurrentActiveCouponType("SINGABLE")?9:-1),o(),h(n.isCurrentActiveCouponType("REUSABLE")?10:-1),o(2),h(!n.currentCoupon&&n.currentActiveCouponType==="SINGABLE"?12:-1),o(),h(!n.currentCoupon&&n.currentActiveCouponType==="REUSABLE"?13:-1),o(),h(n.currentCoupon&&n.currentActiveCouponType==="SINGABLE"?14:-1),o(),h(n.currentCoupon&&n.currentActiveCouponType==="REUSABLE"?15:-1))},dependencies:[nt,L,at,N,z,ut,A,V],styles:[".modal-header[_ngcontent-%COMP%]{justify-content:space-between!important;align-items:flex-start;gap:20px}.modal-header[_ngcontent-%COMP%]   .modal-title-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.modal-header[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%]{margin:12px 0 0;font-style:normal;font-weight:400;font-size:1rem;line-height:1.5rem;color:#16181d}@media (max-width: 991px){.modal-header[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%]{line-height:1.3rem}}.modal-header[_ngcontent-%COMP%]   button[_ngcontent-%COMP%], .modal
3-header[_ngcontent-%COMP%]   .close[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:5px;margin:0}.modal-header[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   span[_ngcontent-%COMP%], .modal-header[_ngcontent-%COMP%]   .close[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:flex;width:24px;height:24px;position:relative}.modal-header[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]     svg, .modal-header[_ngcontent-%COMP%]   .close[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]     svg{width:100%;height:100%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}  a.link{color:#4898a8!important}.coupon-switcher-wr[_ngcontent-%COMP%]{text-align:center}.coupon-switcher-wr[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%]{margin:-5px 0 15px}.coupon-switcher-wr[_ngcontent-%COMP%]   span.btn.btn-default[_ngcontent-%COMP%]{color:#16181d;font-weight:600!important;line-height:2.1rem}.coupon-switcher-wr[_ngcontent-%COMP%]   .btn.active[_ngcontent-%COMP%]{background:#4898a81a;border:1px solid #4898A8;color:#4898a8;box-shadow:none;z-index:2}.coupon-tab[_ngcontent-%COMP%]   h6[_ngcontent-%COMP%]{margin:12px 0;text-align:center}.coupon-tab-item[_ngcontent-%COMP%]{margin-bottom:15px;position:relative}.coupon-tab-item[_ngcontent-%COMP%]   .switcher-label-xs[_ngcontent-%COMP%]{margin:0 0 0 10px}label[_ngcontent-%COMP%], .control-label[_ngcontent-%COMP%]{display:inherit;font-style:normal;font-weight:500;font-size:1rem;line-height:1.2rem;color:#16181d;margin:0 0 8px;gap:10px}label[_ngcontent-%COMP%]   a[_ngcontent-%COMP%], .control-label[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{display:flex;width:22px;height:22px;position:relative;color:#7e889a}label[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]     svg, .control-label[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]     svg{width:100%;height:100%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}input[_ngcontent-%COMP%], textarea[_ngcontent-%COMP%]{min-height:50px;padding:14px;border-color:#d4d7dd;font-style:normal;font-weight:400;font-size:1rem;line-height:1.2rem}.modal-body[_ngcontent-%COMP%]{padding:30px 40px 40px}.form-buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.form-buttons[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin-top:15px;padding:14px;font-style:normal;font-weight:500;font-size:1rem;line-height:1.2rem;color:#fff}@media (max-width: 991px){.form-buttons[_ngcontent-%COMP%]{justify-content:center}}"]})}}return e})();var H=(()=>{class e{constructor(){this.modalService=b(st),this.couponService=b(E)}openCouponModal(t){let a=this.modalService.open(xt,{size:"lg",windowClass:"animate__animated animate__slideInDown animate__faster"});a.componentInstance.currentCoupon=t||null,a.result.then(n=>{n&&this.couponService.updateCouponsList.next()}).catch(()=>{})}static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Pt=yt(St());function Ft(e,g){if(e&1){let t=O();p(0,"div",10)(1,"input",11),l(2,"translate"),y("ngModelChange",function(n){f(t);let r=s();return v(r.couponEditingName,n)||(r.couponEditingName=n),M(n)}),i()(),p(3,"button",12),l(4,"translate"),x("click",function(){f(t);let n=s();return M(n.toggleCouponNameEditing())}),C(5,"span",13),i(),p(6,"button",14),l(7,"translate"),x("click",function(){f(t);let n=s();return M(n.updateCoupon())}),C(8,"span",15),i()}if(e&2){let t=s();U("is-invalid",t.couponEditingName.trim().length===0),o(),d("placeholder",S(c(2,10,"containerized.container.add.name"))),w("ngModel",t.couponEditingName),o(2),d("title",S(c(4,12,"global.cancel"))),o(3),d("title",S(c(7,14,"coupons.coupon.edit.tooltip")))("disabled",t.couponEditingName.trim().length===0)}}function qt(e,g){if(e&1){let t=O();p(0,"span",16),u(1),i(),p(2,"button",17),l(3,"translate"),x("click",function(){f(t);let n=s();return M(n.toggleCouponNameEditing())}),C(4,"span",18),i()}if(e&2){let t=s();d("title",t.coupon.name),o(),m(t.coupon.name),o(),d("title",S(c(3,4,"coupons.coupon.edit.tooltip")))}}function Jt(e,g){e&1&&(p(0,"span"),u(1),l(2,"translate"),i()),e&2&&(o(),m(c(2,1,"coupons.modal.newCoupon.tab2.title")))}function Kt(e,g){e&1&&(p(0,"span"),u(1),l(2,"translate"),i()),e&2&&(o(),m(c(2,1,"coupons.modal.newCoupon.tab1.title")))}var Ot=(()=>{class e{constructor(){this.translate=b(W),this.toastr=b(lt),this.couponModalService=b(H),this.couponService=b(E),this._couponNameEditing$=new F(!1),this.couponNameEditing$=this._couponNameEditing$.asObservable().pipe(J(t=>{t?this.couponEditingName=this.coupon.name:this.couponEditingName=""}))}ngAfterViewInit(){setTimeout(()=>{$('[data-toggle="tooltip"]')?.tooltip({trigger:"hover"})},1e3)}ngOnChanges(){this.couponCodeToPaste=`[coupon_${this.coupon.code}]`}ngAfterViewChecked(){$("#"+this.coupon.id+" .name .cut")&&$("#"+this.coupon.id+" .name .cut")[0]&&($("#"+this.coupon.id+" .name .cut")[0].scrollWidth>$("#"+this.coupon.id+" .name .cut").innerWidth()+.4?$("#"+this.coupon.id+" .name .cut")?.tooltip({trigger:"hover"}):$("#"+this.coupon.id+" .name .cut")?.tooltip("hide"))}toggleCouponNameEditing(){$('[data-toggle="tooltip"]')?.tooltip("hide"),this._couponNameEditing$.next(!this._couponNameEditing$.getValue())}updateCoupon(){if($('[data-toggle="tooltip"]')?.tooltip("hide"),this.couponEditingName===this.coupon.name||!this.couponEditingName.length||this.couponEditingName.length>44){this.toggleCouponNameEditing();return}this.coupon.name=this.couponEditingName,this.couponService.getCouponById(this.coupon.id).pipe(q(t=>{if(t){let a=t;return a.name=this.couponEditingName,this.couponService.updateCoupon(this.coupon.id,a)}})).subscribe(()=>this.toggleCouponNameEditing())}copyCouponCode(){let t=document.createElement("textarea");t.value=this.couponCodeToPaste,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t);let a=document.getSelection().rangeCount>0?document.getSelection().getRangeAt(0):!1;t.select(),document.execCommand("copy"),document.body.removeChild(t),a&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(a)),this.toastr.success(this.translate.instant("coupons.coupon.copied.desc"),this.translate.instant("global.done"))}openEditableCouponModal(){this.couponService.getCouponById(this.coupon.id).subscribe(t=>{t&&this.couponModalService.openCouponModal(t)})}
3removeCoupon(){Pt.default.fire({title:this.translate.instant("coupons.coupon.delete.title"),text:this.translate.instant("coupons.coupon.delete.text"),icon:"warning",showCancelButton:!0,confirmButtonColor:"#DD6B55",heightAuto:!1,confirmButtonText:this.translate.instant("coupons.coupon.delete.tooltip"),cancelButtonText:this.translate.instant("widgetsList.widget.delete.cancel")}).then(t=>{t.isConfirmed&&this.couponService.deleteCoupon(this.coupon.id).subscribe(a=>{a&&this.toastr.success(this.translate.instant("coupons.coupon.delete.desc"),this.translate.instant("global.done")),this.couponService.updateCouponsList.next()})})}static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275cmp=T({type:e,selectors:[["app-coupon-item"]],inputs:{first:"first",coupon:"coupon"},standalone:!1,features:[Q],decls:19,vars:21,consts:[[3,"id"],[1,"name"],[1,"code-coupon"],["data-container","body","data-placement","bottom","data-toggle","tooltip",3,"click","innerHTML","title"],[1,"type-coupon"],[1,"actions-coupon"],[1,"btns"],["data-container","body","data-placement","bottom","data-toggle","tooltip",1,"btn","btn-sm","btn-default",3,"click","title"],["inlineSVG","/assets/images/core/settings.svg"],["inlineSVG","/assets/images/core/delete-icon.svg"],[1,"input"],["type","text",1,"form-control",3,"ngModelChange","ngModel","placeholder"],["data-container","body","data-placement","bottom","data-toggle","tooltip",1,"btn","btn-default",3,"click","title"],["inlineSVG","/assets/images/core/cross.svg"],["data-container","body","data-placement","bottom","data-toggle","tooltip",1,"btn","btn-default",3,"click","disabled","title"],["inlineSVG","/assets/images/core/check.svg"],[1,"cut",3,"title"],["data-container","body","data-placement","bottom","data-toggle","tooltip","data-trigger","hover",1,"btn",3,"click","title"],["inlineSVG","/assets/images/core/pencil.svg"]],template:function(a,n){a&1&&(p(0,"tr",0)(1,"td",1),_(2,Ft,9,16),l(3,"async"),Y(4,qt,5,6),i(),p(5,"td",2)(6,"span",3),l(7,"translate"),x("click",function(){return n.copyCouponCode()}),i()(),p(8,"td",4),_(9,Jt,3,3,"span"),_(10,Kt,3,3,"span"),i(),p(11,"td",5)(12,"div",6)(13,"button",7),l(14,"translate"),x("click",function(){return n.openEditableCouponModal()}),C(15,"span",8),i(),p(16,"button",7),l(17,"translate"),x("click",function(){return n.removeCoupon()}),C(18,"span",9),i()()()()),a&2&&(U("no-border",n.first),d("id",n.coupon.id),o(2),h(c(3,13,n.couponNameEditing$)?2:4),o(4),d("title",S(c(7,15,"coupons.coupon.copied.tooltip")))("innerHTML",n.couponCodeToPaste,P),o(3),h(n.coupon.type==="REUSABLE"?9:-1),o(),h(n.coupon.type!=="REUSABLE"?10:-1),o(3),d("title",S(c(14,17,"coupons.coupon.edit.update"))),o(3),d("title",S(c(17,19,"coupons.coupon.delete.tooltip"))))},dependencies:[L,N,z,A,ot,V],styles:["[_nghost-%COMP%]{display:flex;width:inherit;position:relative}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]{width:100%;display:flex;align-items:flex-start;min-width:auto}[_nghost-%COMP%]   tr.no-border[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border-top:none!important}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;justify-content:flex-start;padding:19px 14px;font-style:normal;font-weight:500;font-size:.9rem;line-height:1.2rem;text-align:left;color:#16181d;word-break:break-all}@media (max-width: 1919px){[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:7px 10px;font-size:.8rem;line-height:1rem}}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:not(:last-of-type){border-right:1px solid #D4D7DD!important}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]   .cut[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.name[_ngcontent-%COMP%]{width:50%;min-width:320px;font-size:.9rem;line-height:1.2rem;font-weight:700;position:relative;justify-content:space-between;flex-wrap:nowrap;gap:8px;white-space:nowrap}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.name[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-letter{text-transform:uppercase}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.name[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.name[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:8px}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.name[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:not(.btn-default).btn{padding:4px}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.name[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:not(.btn-default).btn   span[_ngcontent-%COMP%]{width:28px;height:28px}@media (max-width: 1919px){[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.name[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:not(.btn-default).btn   span[_ngcontent-%COMP%]{width:22px;height:22px}}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.name[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:not(.btn-default).btn:not(:focus){opacity:0}
3@media (max-width: 1199px){[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.name[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:not(.btn-default).btn:not(:focus){opacity:1}}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.name[_ngcontent-%COMP%]   button.btn[_ngcontent-%COMP%]{width:34px!important;height:34px!important;padding:7px}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.name[_ngcontent-%COMP%]   button.btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:block;width:22px;height:22px;position:relative}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.name[_ngcontent-%COMP%]   button.btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]     svg{width:100%;height:100%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.name[_ngcontent-%COMP%]   button.btn-default[_ngcontent-%COMP%]:last-child{background-color:#59a44a}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.name[_ngcontent-%COMP%]   button.btn-default[_ngcontent-%COMP%]:last-child   span[_ngcontent-%COMP%]{color:#fff}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.name[_ngcontent-%COMP%]:hover   button[_ngcontent-%COMP%]:not(.btn-default).btn{opacity:1}@media (max-width: 1919px){[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.name[_ngcontent-%COMP%]{min-width:265px}}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.code-coupon[_ngcontent-%COMP%]{width:15%;min-width:320px}@media (max-width: 1919px){[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.code-coupon[_ngcontent-%COMP%]{min-width:220px}}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.type-coupon[_ngcontent-%COMP%]{width:25%;min-width:250px}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.actions-coupon[_ngcontent-%COMP%]{width:10%;min-width:180px;justify-content:center}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.actions-coupon[_ngcontent-%COMP%]   .btns[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.actions-coupon[_ngcontent-%COMP%]   .btns[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-width:60px;height:36px;padding:4px 16px;border:1px solid #D4D7DD;font-style:normal;font-weight:500;font-size:1rem;line-height:1.2rem;color:#505662;border-radius:0;background-color:#fff}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.actions-coupon[_ngcontent-%COMP%]   .btns[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:not(:disabled):hover{background-color:#f4f4f6}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.actions-coupon[_ngcontent-%COMP%]   .btns[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:not(:disabled):focus{position:relative;z-index:1000}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.actions-coupon[_ngcontent-%COMP%]   .btns[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:flex;width:28px;height:28px;position:relative;color:#505662}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.actions-coupon[_ngcontent-%COMP%]   .btns[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]     svg{width:100%;height:100%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@media (max-width: 1919px){[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.actions-coupon[_ngcontent-%COMP%]   .btns[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{width:24px;height:24px}}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.actions-coupon[_ngcontent-%COMP%]   .btns[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:first-child{border-bottom-left-radius:5px;border-top-left-radius:5px;border-right-color:transparent}[_nghost-%COMP%]   tr[_ngcontent-%COMP%]   td.actions-coupon[_ngcontent-%COMP%]   .btns[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:last-child{border-bottom-right-radius:5px;border-top-right-radius:5px}"]})}}return e})();function Xt(e,g){e&1&&(p(0,"div",4)(1,"h3",5),u(2),l(3,"translate"),i(),p(4,"h4",6),u(5),l(6,"translate"),i(),C(7,"h5",7),l(8,"translate"),i()),e&2&&(o(2),m(c(3,3,"coupons.empty.title")),o(3),m(c(6,5,"coupons.empty.subtitle")),o(2),d("innerHTML",c(8,7,"coupons.empty.help"),P))}function Yt(e,g){if(e&1&&C(0,"app-coupon-item",13),e&2){let t=g.$implicit,a=g.$
3index;d("coupon",t)("first",a===0)}}function Zt(e,g){if(e&1&&(p(0,"app-card")(1,"div",8)(2,"table")(3,"thead")(4,"th",9),u(5),l(6,"translate"),i(),p(7,"th",10),u(8),l(9,"translate"),i(),p(10,"th",11),u(11),l(12,"translate"),i(),p(13,"th",12),u(14),l(15,"translate"),i()(),p(16,"tbody"),Z(17,Yt,1,2,"app-coupon-item",13,X().trackById,!0),i()()()()),e&2){let t=s();o(5),m(c(6,4,"coupons.grid.coupon.name")),o(3),m(c(9,6,"coupons.grid.coupon.code")),o(3),m(c(12,8,"coupons.grid.coupon.type")),o(3),m(c(15,10,"coupons.grid.coupon.control")),o(3),tt(t.coupons)}}var wt=(()=>{class e{constructor(){this.location=b(et),this.couponModalService=b(H),this.couponService=b(E),this.coupons=[],this.enableCouponModal=!1,this.enableCouponModal=this.location.path().includes("enableCouponModal")}ngOnInit(){this.getCouponsList(),this.couponService.updateCouponsList.subscribe(()=>{this.getCouponsList()})}getCouponsList(){this.coupons=[],this.couponsSub=this.couponService.getCouponsList().subscribe(t=>{this.coupons=t,this.enableCouponModal&&(this.enableCouponModal=!1,setTimeout(()=>{this.openCouponModal()},500))})}openCouponModal(){this.couponModalService.openCouponModal()}trackById(t,a){return a.id}ngOnDestroy(){this.couponsSub&&this.couponsSub.unsubscribe()}static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275cmp=T({type:e,selectors:[["app-coupons"]],standalone:!1,decls:11,vars:7,consts:[[1,"page-title"],[1,"title-main"],["type","button",1,"btn","btn-lg","btn-success","title-button",3,"click"],["inlineSVG","/assets/images/core/plus.svg",1,"icon"],[1,"col-lg-12"],[1,"f-0","text-center"],[1,"f-2","text-center"],[1,"f-3","text-center","underline-links","blue-links","hover-links",3,"innerHTML"],[1,"coupons-table"],[1,"name-coupon"],[1,"code-coupon"],[1,"type-coupon"],[1,"actions-coupon"],[1,"table-row",3,"coupon","first"]],template:function(a,n){a&1&&(p(0,"div",0)(1,"h1",1),u(2),l(3,"translate"),i(),p(4,"button",2),x("click",function(){return n.openCouponModal()}),C(5,"span",3),p(6,"span"),u(7),l(8,"translate"),i()()(),_(9,Xt,9,9,"div",4)(10,Zt,19,12,"app-card")),a&2&&(o(2),m(c(3,3,"sidebar.coupons")),o(5),m(c(8,5,"coupons.addCoupon")),o(2),h(n.coupons.length?10:9))},dependencies:[A,Ct,Ot,V],styles:[".page-title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:20px}.title-button[_ngcontent-%COMP%]{padding:20px 24px;border-radius:10px;display:flex;align-items:center;justify-content:space-between}.title-button[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-style:normal;font-weight:500;font-size:1.3rem;line-height:1.7rem}.title-button[_ngcontent-%COMP%]   span.icon[_ngcontent-%COMP%]{width:26px;height:26px;margin-right:18px;position:relative}.title-button[_ngcontent-%COMP%]   span.icon[_ngcontent-%COMP%]     svg{width:100%;height:100%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@media (max-width: 1919px){.title-button[_ngcontent-%COMP%]{padding:14px 18px}}@media (max-width: 1199px){.title-button[_ngcontent-%COMP%]{padding:16px 20px}.title-button[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:1.1rem;line-height:1.5rem}}@media (max-width: 991px){.title-button[_ngcontent-%COMP%]{padding:12px 16px}.title-button[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:.9rem;line-height:1.2rem}.title-button[_ngcontent-%COMP%]   span.icon[_ngcontent-%COMP%]{width:22px;height:22px}}@media (max-width: 767px){.title-button[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{line-height:1rem}.title-button[_ngcontent-%COMP%]   span.icon[_ngcontent-%COMP%]{width:18px;height:18px;margin-right:10px}}[_nghost-%COMP%]   .page-title[_ngcontent-%COMP%]{margin-bottom:50px}[_nghost-%COMP%]   .coupons-table[_ngcontent-%COMP%]{display:block;width:100%;max-height:65vh;margin-top:22px;border:1px solid #D4D7DD;border-radius:5px;overflow:auto}[_nghost-%COMP%]   .coupons-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]{table-layout:fixed;width:100%;height:100%;position:relative}[_nghost-%COMP%]   .coupons-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]{width:100%;display:flex;position:sticky;z-index:1;top:0;background-color:#fff}[_nghost-%COMP%]   .coupons-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{display:table-header-group;height:100%;padding:19px 14px;font-style:normal;font-weight:500;font-size:1rem;line-height:1.2rem;text-align:left;color:#7e889a;background-color:#fff;border-bottom:1px solid #D4D7DD}@media (max-width: 1919px){[_nghost-%COMP%]   .coupons-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{padding:7px 10px;font-size:.8rem;line-height:1.2rem}}[_nghost-%COMP%]   .coupons-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:not(:last-of-type){border-right:1px solid #D4D7DD}[_nghost-%COMP%]   .coupons-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th.name-coupon[_ngcontent-%COMP%]{width:50%;min-width:320px}@media (max-width: 1919px){[_nghost-%COMP%]   .coupons-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th.name-coupon[_ngcontent-%COMP%]{min-width:265px}}[_nghost-%COMP%]   .coupons-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th.code-coupon[_ngcontent-%COMP%]{width:15%;min-width:320px}@media (max-width: 1919px){[_nghost-%COMP%]   .coupons-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th.code-coupon[_ngcontent-%COMP%]{min-width:220px}}[_nghost-%COMP%]   .coupons-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th.type-coupon[_ngcontent-%COMP%]{width:25%;min-width:250px}[_nghost-%COMP%]   .coupons-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th.actions-coupon[_ngcontent-%COMP%]{width:10%;min-width:180px}[_nghost-%COMP%]   .coupons-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   .table-row[_ngcontent-%COMP%]     tr td{border-top:1px solid #D4D7DD}"]})}}return e})();var $t=[{path:"",component:wt,title:"sidebar.coupons"}],vt=(()=>{class e{static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275mod=D({type:e})}static{this.\u0275inj=k({imports:[G.forChild($t),G]})}}return e})();var en=(()=>{class e{static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275mod=D({type:e})}static{this.\u0275inj=k({imports:[it,pt,ct,_t,mt,rt,gt,vt]})}}return e})();export{en as CouponsModule};

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.