PageSourceSearch

https://admin.nutrislice.com/100.bfaa2f3ea2a46c58.js

js nutrislice.com collected 2026-09-24 09:34:03 UTC 46,179 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkadmin=self.webpackChunkadmin||[]).push([[100],{69100(Ht,Se,a){a.d(Se,{CustomersModule:()=>Lt});var h=a(70296),_=a(92498),m=a(6164),e=a(62552),L=a(61493);class te{}class ke extends te{process(n){const t={};return n.display_name&&(t.labelText=n.display_name),t}}var M=a(97434),ne=a(99129),oe=a(87404),E=a(59365),B=a(97552),p=a(26099),U=a(42483),ie=a(83507);const $e=(o,n,t)=>({compact:!0,disabled:o,leadingIcon:n,type:t});function Ge(o,n){if(1&o&&e.nrm(0,"ns-form-control",2),2&o){const t=e.XpG();e.Y8G("nsControl",t.nsForm.nsControls.helpText)}}let w=class W{control;Delete=oe.B.NsTrashIcon;field;nsForm;quaternaryButton=ne.E.Quaternary;removed=new e.bkB;subs=new L.yU;constructor(n){this.control=n,this.control&&(this.control.valueAccessor=this)}ngOnInit(){this.control&&this.control.statusChanges&&(this.control.errors||this.nsForm.clearServerErrors(),this.subs.add(this.control.statusChanges.subscribe(()=>{this.control.errors?this.nsForm.setServerErrors(this.control.errors):this.nsForm.clearServerErrors()})))}registerOnChange(n){this.onChange=n}registerOnTouched(n){this.onTouched=n}remove(){this.removed.emit(void 0)}writeValue(n){this.field=n,this.instantiateForm()}instantiateForm(){const n=!this.field.isEditable(),t=!this.field.isRequired(),i={labelText:new p.l(p.g.Text,{defaultValue:this.field.displayName,disabled:n,label:"Label Text",validation:{maxLength:{message:"Your display name needs to be shorter than 50",validator:m.k0.maxLength(50)}}}),required:new E.O({defaultValue:this.field.required,disabled:t,label:"Required"}),showOnPrintTicket:new E.O({defaultValue:this.field.showOnPrintTicket,label:"Show On Print Ticket"})};this.field.isEditable()&&(i.helpText=new p.l(p.g.Text,{defaultValue:this.field.helpText,label:"Help Text"})),this.nsForm=new B.$(i,[],{},new ke),this.subs.add(this.nsForm.form.valueChanges.subscribe(s=>{n||(this.field.displayName=s.labelText),void 0!==s.helpText&&(this.field.helpText=s.helpText),t||(this.field.required=s.required),this.field.showOnPrintTicket=s.showOnPrintTicket,this.onChange(this.field)}))}onChange=n=>{};onTouched=()=>{};static \u0275fac=function(t){return new(t||W)(e.rXU(m.vO,10))};static \u0275cmp=e.VBU({type:W,selectors:[["admin-account-field-edit"]],outputs:{removed:"removed"},decls:11,vars:10,consts:[[1,"field-name"],[1,"text-input"],[3,"nsControl"],[1,"text-input","help-text"],[3,"nsControl",4,"ngIf"],[1,"checkboxes"],[3,"click","options"]],template:function(t,i){1&t&&(e.j41(0,"div",0),e.EFF(1),e.k0s(),e.j41(2,"div",1),e.nrm(3,"ns-form-control",2),e.k0s(),e.j41(4,"div",3),e.DNE(5,Ge,1,1,"ns-form-control",4),e.k0s(),e.j41(6,"div",5),e.nrm(7,"ns-form-control",2)(8,"ns-form-control",2),e.k0s(),e.j41(9,"div")(10,"ns-button",6),e.bIt("click",function(){return i.remove()}),e.k0s()()),2&t&&(e.R7$(),e.SpI(" ",i.field.fieldNameFriendly,"\n"),e.R7$(2),e.Y8G("nsControl",i.nsForm.nsControls.labelText),e.R7$(2),e.Y8G("ngIf",i.nsForm.nsControls.helpText),e.R7$(2),e.Y8G("nsControl",i.nsForm.nsControls.required),e.R7$(),e.Y8G("nsControl",i.nsForm.nsControls.showOnPrintTicket),e.R7$(2),e.Y8G("options",e.sMw(6,$e,!i.field.isDeleteable(),i.Delete,i.quaternaryButton)))},dependencies:[U.c,h.bT,ie.x],styles:['.field-name[_ngcontent-%COMP%]{font-family:"Roboto",-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;font-size:1.6rem;font-weight:400;line-height:2.2rem}[_nghost-%COMP%]{display:flex;align-items:center}.field-name[_ngcontent-%COMP%]{min-width:128px}.checkboxes[_ngcontent-%COMP%], .field-name[_ngcontent-%COMP%], .text-input[_ngcontent-%COMP%]{margin-right:1.6rem}.help-text[_ngcontent-%COMP%]{flex:1 1 auto}.checkboxes[_ngcontent-%COMP%]{display:flex;flex-direction:column}']})};w=function(o,n,t,i){var c,s=arguments.length,r=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(o,n,t,i);else for(var f=o.length-1;f>=0;f--)(c=o[f])&&(r=(s<3?c(r):s>3?c(n,t,r):c(n,t))||r);return s>3&&r&&Object.defineProperty(n,t,r),r}([(0,M.P)(),function(o,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata("design:paramtypes",n)}(0,[m.vO])],w);var l=function(o){return o.CustomerId="external_id",o.CustomField="custom_field",o.Email="email",o.FirstName="first_name",o.LastName="last_name",o.PhoneNumber="phone_number",o}(l||{});const F={[l.CustomerId]:"Customer ID",[l.CustomField]:"Custom Field",[l.Email]:"Email",[l.FirstName]:"First Name",[l.LastName]:"Last Name",[l.PhoneNumber]:"Phone Number"};var g=function(o){return o.Guest="guest",o.Employee="employee",o.Parent="parent",o.Staff="staff",o.Student="student",o.Visitor="visitor",o}(g||{});const re={[g.Guest]:"Guest",[g.Employee]:"Employee",[g.Parent]:"Parent/Child",[g.Staff]:"Staff",[g.Student]:"Student",[g.Visitor]:"Visitor"};var Y=function(o){return o.Parent="parent_child",o.Standard="standard",o}(Y||{}),C=a(77235);class ae{data;constructor(n){this.data=n}get barcodeFieldLabel(){let n=`${this.displayName}`;return this.isChild&&(n=`${n} - Child`),n}copy(){return C.cloneDeep(this)}get displayName(){return this.data.display_name}set displayName(n){this.data.display_name=n}get fieldName(){return this.data.field_name}get fieldNameFriendly(){return F[this.fieldName]}get helpText(){return this.data.help_text}set helpText(n){this.data.help_text=n}get id(){return this.data.id}get isChild(){return this.data.is_child_account_field}isDeleteable(){return this.isRequired()}isEditable(){return this.fieldName===l.CustomerId||this.fieldName===l.CustomField||this.fieldName===l.PhoneNumber}isRequired(){return this.isEditable()||this.isChild&&this.fieldName===l.Email}get name(){return this.data.field_name}get order(){return this.data.order}set order(n){this.data.order=n}get required(){return this.data.is_required}set required(n){this.data.is_required=n}get showOnBarcode(){return this.data.show_on_barcode}set showOnBarcode(n){this.data.show_on_barcode=n}get showOnPrintTicket(){return this.data.show_on_print_ticket}set showOnPrintTicket(n){this.data.show_on_print_ticket=n}
1toJSON(){return this.data}}class v{data;_fields;_childFields;constructor(n,t=[],i=[]){this.data=n,this._fields=t,this._childFields=i}static fromRemotes(n){return n.map(t=>new v(t))}static needsChildFields(n){return n===g.Parent}get active(){return this.data.is_active}set active(n){this.data.is_active=n}get allFields(){return this._fields.concat(this._childFields)}get barcodeEmailConfirmation(){return this.data.barcode_email_confirmation}set barcodeEmailConfirmation(n){this.data.barcode_email_confirmation=n}get barcodeField(){return this.allFields.find(n=>n.showOnBarcode)}get barcodeFulfillmentReport(){return this.data.barcode_fulfillment_report}set barcodeFulfillmentReport(n){this.data.barcode_fulfillment_report=n}get barcodePrintedTicket(){return this.data.barcode_printed_ticket}set barcodePrintedTicket(n){this.data.barcode_printed_ticket=n}get childFields(){return this._childFields}set childFields(n){if(!this.needsChildFields()&&n.length)throw new Error("Child fields only exist on parent accounts");this._childFields=n}copy(){return C.cloneDeep(this)}get fields(){return this._fields}set fields(n){this._fields=n}get id(){return this.data.id}get lastActive(){return this.data.is_last_active}get name(){return this.data.name}set name(n){this.data.name=n,this.data.type=n===g.Parent?Y.Parent:Y.Standard}get nameFriendly(){return re[this.name]}needsChildFields(){return v.needsChildFields(this.name)}setBarcodeField(n){this.allFields.forEach(t=>{t.showOnBarcode=!1}),n&&(n.showOnBarcode=!0)}toJSON(){const n=C.cloneDeep(this.data);return n.fields=this.allFields.map((t,i)=>(t.order=i,t.toJSON())),n}get type(){return this.data.type}}let O=(()=>{class o{createAccountField(t){return new ae(t)}createAccountType(t){const i=[],s=[];return t.fields.forEach(r=>{const c=this.createAccountField(r);c.isChild?s.push(c):i.push(c)}),new v(t,i,s)}createAccountTypes(t){return t.map(i=>this.createAccountType(i))}createDefaultAccountField(t,i,s){let r;switch(t){case l.CustomerId:r={display_name:F[l.CustomerId],field_name:l.CustomerId,help_text:"",is_child_account_field:s,is_required:!1,order:i,show_on_print_ticket:!1};break;case l.CustomField:r={display_name:F[l.CustomField],field_name:l.CustomField,help_text:"",is_child_account_field:s,is_required:!1,order:i,show_on_print_ticket:!1};break;case l.Email:r={display_name:F[l.Email],field_name:l.Email,help_text:"",is_child_account_field:s,is_required:!s,order:i,show_on_print_ticket:!1};break;case l.FirstName:r={display_name:F[l.FirstName],field_name:l.FirstName,help_text:"",is_child_account_field:s,is_required:!0,order:i,show_on_print_ticket:!1};break;case l.LastName:r={display_name:F[l.LastName],field_name:l.LastName,help_text:"",is_child_account_field:s,is_required:!0,order:i,show_on_print_ticket:!1};break;case l.PhoneNumber:r={display_name:F[l.PhoneNumber],field_name:l.PhoneNumber,help_text:"",is_child_account_field:s,is_required:!1,order:i,show_on_print_ticket:!1};break;default:throw new Error(`Unrecognized field type ${t}`)}return new ae(r)}createDefaultFields(t){const i=[];return t===g.Parent&&i.push(this.createDefaultAccountField(l.FirstName,0,!0),this.createDefaultAccountField(l.LastName,1,!0)),{childFields:i,fields:[this.createDefaultAccountField(l.FirstName,0,!1),this.createDefaultAccountField(l.LastName,1,!1),this.createDefaultAccountField(l.Email,2,!1)]}}static \u0275fac=function(i){return new(i||o)};static \u0275prov=e.jDH({token:o,factory:o.\u0275fac})}return o})();const le="childFields";var de=a(28413),Le=a(74051),Be=a(2731),Ue=a(77379);const Xe=(o,n)=>({disabled:o,type:n});function He(o,n){if(1&o){const t=e.RV6();e.j41(0,"ns-card-row",8),e.nrm(1,"ns-icon",9),e.j41(2,"admin-account-field-edit",10),e.bIt("removed",function(){const s=e.eBV(t).index,r=e.XpG();return e.Njj(r.removeField(s))}),e.k0s()()}if(2&o){const t=n.$implicit,i=e.XpG();e.R7$(),e.Y8G("name",i.dragHandle),e.R7$(),e.Y8G("formControl",t)}}function Ke(o,n){if(1&o&&e.nrm(0,"ns-select",11),2&o){const t=e.XpG();e.Y8G("nsControl",t.addAccountControl)}}let R=class Z{control;factory;addAccountControl;children=!1;controls;dragHandle=oe.B.NsDragIcon;fieldControls=[];label="Fields";secondaryButton=ne.E.Secondary;fields;sub;subs=new L.yU;constructor(n,t){this.control=n,this.factory=t,this.control&&(this.control.valueAccessor=this)}addField(){if(!this.addAccountControl)return;const n=this.addAccountControl.control.value;if(!n)return;const t=this.factory.createDefaultAccountField(n,this.fields.length,this.children);this.fields.push(t),this.createControls(),this.onChange(this.fields)}ngOnInit(){this.subs.add(this.control.statusChanges.subscribe(()=>{if(this.control.errors){const n=this.children?le:"fields";this.control.errors[n]&&this.control.errors[n].length&&this.control.errors[n].forEac
1h((t,i)=>{this.fieldControls[i]&&this.fieldControls[i].setErrors(t)})}}))}registerOnChange(n){this.onChange=n}registerOnTouched(n){this.onTouched=n}removeField(n){this.fields.splice(n,1),this.createControls()}reorderFields(n){(0,_.HD)(this.fieldControls,n.previousIndex,n.currentIndex),(0,_.HD)(this.controls.value,n.previousIndex,n.currentIndex),this.onChange(this.controls.value.slice())}writeValue(n){this.fields=n,this.createControls()}createAddAccountControl(){const n={};let t=0;this.fields.forEach(r=>{n[r.fieldName]=!0,r.fieldName===l.CustomField&&++t});const i=[];Object.values(l).forEach(r=>{!n[r]&&r!==l.CustomField&&i.push({label:F[r],value:r})}),t<4&&i.push({label:F[l.CustomField],value:l.CustomField}),this.addAccountControl=i.length?new de.T(i,{defaultValue:i[0].value}):void 0}createControls(){this.fieldControls=this.fields.map(n=>new m.MJ(n)),this.controls=new m.Yp(this.fieldControls),this.controls.valueChanges.subscribe(n=>{this.onChange(n.slice())}),this.createAddAccountControl()}onChange=n=>{};onTouched=()=>{};static \u0275fac=function(t){return new(t||Z)(e.rXU(m.vO,10),e.rXU(O))};static \u0275cmp=e.VBU({type:Z,selectors:[["admin-account-fields-edit"]],inputs:{children:"children",label:"label"},decls:11,vars:7,consts:[["container",""],[1,"full-page-wrap","edit-cards"],[1,"label-text"],["cdkDropList","",3,"cdkDropListDropped"],["class","account-field","cdkDrag","",4,"ngFor","ngForOf"],[1,"page-wrap"],["class","add-account",3,"nsControl",4,"ngIf"],[3,"click","options"],["cdkDrag","",1,"account-field"],["cdkDragHandle","",1,"drag-handle",3,"name"],[3,"removed","formControl"],[1,"add-account",3,"nsControl"]],template:function(t,i){if(1&t){const s=e.RV6();e.j41(0,"div")(1,"div",1)(2,"div",2),e.EFF(3),e.k0s(),e.j41(4,"div",3,0),e.bIt("cdkDropListDropped",function(c){return e.eBV(s),e.Njj(i.reorderFields(c))}),e.DNE(6,He,3,2,"ns-card-row",4),e.k0s()(),e.j41(7,"div",5),e.DNE(8,Ke,1,1,"ns-select",6),e.j41(9,"ns-button",7),e.bIt("click",function(){return e.eBV(s),e.Njj(i.addField())}),e.EFF(10," Add Field "),e.k0s()()()}2&t&&(e.R7$(3),e.JRh(i.label),e.R7$(3),e.Y8G("ngForOf",i.fieldControls),e.R7$(2),e.Y8G("ngIf",i.addAccountControl),e.R7$(),e.Y8G("options",e.l_i(4,Xe,!i.addAccountControl,i.secondaryButton)))},dependencies:[_.O7,h.Sq,Le.p,_.T1,Be.w,_.Fb,w,m.X1,m.BC,m.l_,h.bT,Ue.V,ie.x],styles:['.label-text[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%], .label-text[_ngcontent-%COMP%]{font-family:"Roboto",-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;font-size:1.4rem;font-weight:400;letter-spacing:.025rem;line-height:1.8rem}.label-text[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%], .label-text[_ngcontent-%COMP%]{font-weight:500}.label-text[_ngcontent-%COMP%], .label-text[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%]{font-family:"Roboto",-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;font-size:1.4rem;font-weight:400;letter-spacing:.025rem;line-height:1.8rem}.label-text[_ngcontent-%COMP%], .label-text[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%]{font-weight:500}.label-text[_ngcontent-%COMP%]{display:block;padding:0 .6rem .8rem 0}.label-text[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%]{color:#de465a}.visibly-hidden.label-text[_ngcontent-%COMP%]:not(:focus):not(:active){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.full-page-wrap[_ngcontent-%COMP%], .page-wrap[_ngcontent-%COMP%]{padding:0 2.4rem}.page-wrap[_ngcontent-%COMP%]{max-width:88rem}.edit-cards[_ngcontent-%COMP%]{margin-bottom:1.6rem}ns-card-row[_ngcontent-%COMP%]{margin-bottom:.8rem}ns-icon[_ngcontent-%COMP%]{display:flex;margin-right:1.6rem}admin-account-field-edit[_ngcontent-%COMP%]{width:100%}.add-account[_ngcontent-%COMP%]{display:block;margin-bottom:.8rem}.account-field[_ngcontent-%COMP%]{display:flex}.drag-handle[_ngcontent-%COMP%]{cursor:pointer}']})};R=function(o,n,t,i){var c,s=arguments.length,r=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(o,n,t,i);else for(var f=o.length-1;f>=0;f--)(c=o[f])&&(r=(s<3?c(r):s>3?c(n,t,r):c(n,t))||r);return s>3&&r&&Object.defineProperty(n,t,r),r}([(0,M.P)(),function(o,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata("design:paramtypes",n)}(0,[m.vO,O])],R);var ze=a(7829);class Qe extends te{model;constructor(n){super(),this.model=n}process(n){if(n.fields&&this.model.needsChildFields()){const t=this.model.fields.length;n.childFields=n.fields.slice(t),n.fields=n.fields.slice(0,t),!n.fields.find(r=>Object.keys(r).length>0)&&delete n.fields,!n.childFields.find(r=>Object.keys(r).length>0)&&delete n.childFields}return n}}var u=a(32479),me=a(62965),j=a(58540),x=a(29084),I=a(84754);let y=(()=>{class o extends j.G{factory;baseEp=new me.Y("account-types");specificEp=this.baseEp.child(":id");constructor(t,i,s){super(t,s),this.factory=i}availableAccountNames(){return this.list().pipe((0,u.T)(t=>{const i={};
1return t.results.forEach(s=>{i[s.name]=!0}),Object.values(g).filter(s=>!i[s])}))}delete(t){return this._delete(this.specificEp,{},{id:t.id})}get(t){return this._get(this.specificEp,{},{id:t}).pipe((0,u.T)(i=>this.factory.createAccountType(i)))}list(t){let i={};return t&&(i=t.toQueryParams()),this._get(this.baseEp,i).pipe((0,u.T)(s=>this.handleListResponse(s,r=>this.factory.createAccountTypes(r))))}quickList(){return this._get(this.baseEp).pipe((0,u.T)(t=>v.fromRemotes(t)))}save(t){const i=t.toJSON();let s;return s=t.id?this._patch(this.specificEp,i,{id:t.id}):this._post({ep:this.baseEp,payload:i}),s.pipe((0,u.T)(r=>this.factory.createAccountType(r)))}toggleActive(t,i){return this._patch(this.specificEp,{is_active:t},{id:i.id}).pipe((0,u.T)(s=>this.factory.createAccountType(s)))}static \u0275fac=function(i){return new(i||o)(e.KVO(I.Qq),e.KVO(O),e.KVO(x.s))};static \u0275prov=e.jDH({token:o,factory:o.\u0275fac})}return o})();var ue=a(62144),V=a(31788),fe=a(26501),pe=a(11162);function qe(o,n){if(1&o&&e.nrm(0,"admin-account-fields-edit",6),2&o){const t=e.XpG();e.Y8G("formControl",t.nsForm.nsControls.fields)}}function et(o,n){if(1&o&&e.nrm(0,"admin-account-fields-edit",7),2&o){const t=e.XpG();e.Y8G("children",!0)("formControl",t.nsForm.nsControls.childFields)}}function tt(o,n){if(1&o&&e.nrm(0,"ns-form-control",1),2&o){const t=e.XpG(2);e.Y8G("nsControl",t.nsForm.nsControls.barcodeField)}}function nt(o,n){if(1&o&&e.nrm(0,"ns-form-control",1),2&o){const t=e.XpG(2);e.Y8G("nsControl",t.nsForm.nsControls.barcodePrintedTicket)}}function ot(o,n){if(1&o&&e.nrm(0,"ns-form-control",1),2&o){const t=e.XpG(2);e.Y8G("nsControl",t.nsForm.nsControls.barcodeEmailConfirmation)}}function it(o,n){if(1&o&&e.nrm(0,"ns-form-control",1),2&o){const t=e.XpG(2);e.Y8G("nsControl",t.nsForm.nsControls.barcodeFulfillmentReport)}}function st(o,n){if(1&o&&(e.j41(0,"div",0),e.DNE(1,tt,1,1,"ns-form-control",8),e.j41(2,"div",9)(3,"div",2),e.EFF(4,"Display Barcodes On"),e.k0s(),e.DNE(5,nt,1,1,"ns-form-control",8)(6,ot,1,1,"ns-form-control",8)(7,it,1,1,"ns-form-control",8),e.k0s()()),2&o){const t=e.XpG();e.R7$(),e.Y8G("ngIf",t.nsForm.nsControls.barcodeField),e.R7$(4),e.Y8G("ngIf",t.nsForm.nsControls.barcodePrintedTicket),e.R7$(),e.Y8G("ngIf",t.nsForm.nsControls.barcodeEmailConfirmation),e.R7$(),e.Y8G("ngIf",t.nsForm.nsControls.barcodeFulfillmentReport)}}let A=class q extends ue.G{account;factory;settings;model;useBarcodes=!1;nsForm;barcodeChoices=new ze.t([]);constructor(n,t,i,s){super(n),this.account=t,this.factory=i,this.settings=s}ngOnDestroy(){this.barcodeChoices.complete()}ngOnInit(){this.useBarcodes=this.settings.globalSettings.barcodesEnabled,this.handleFieldChoices(),super.ngOnInit()}buildForm(){const n={active:new E.O({disabled:this.model.lastActive,label:"Active"})};return n.name=this.model.id?new de.T([{label:this.model.nameFriendly,value:this.model.name}],{disabled:!0,label:"Account Type"}):new fe.D({customList:()=>this.account.availableAccountNames(),label:"Account Type",labelGetter:t=>re[t]}),this.model.name&&(n.fields=new m.MJ),this.model.needsChildFields()&&(n.childFields=new m.MJ),this.useBarcodes&&(n.barcodeField=new fe.D({blankOption:{label:"None",value:void 0},customList:()=>this.barcodeChoices.asObservable(),label:"Generate Barcode From",labelGetter:t=>t.barcodeFieldLabel}),n.barcodePrintedTicket=new E.O({label:"Printed Tickets"}),n.barcodeEmailConfirmation=new E.O({label:"Email Confirmation"}),n.barcodeFulfillmentReport=new E.O({label:"Order Details Report"})),new B.$(n,[],{},new Qe(this.model))}formChange(n){if(this.model.active=n.active,n.name&&this.model.name!==n.name){this.model.name=n.name;const t=this.factory.createDefaultFields(this.model.name);this.model.fields.length||(this.model.fields=t.fields),this.model.childFields=t.childFields}void 0!==n.fields&&(this.model.fields=n.fields),void 0!==n.childFields&&(this.model.childFields=n.childFields),this.handleFieldChoices(),void 0!==n.barcodeEmailConfirmation&&(this.model.barcodeEmailConfirmation=n.barcodeEmailConfirmation),void 0!==n.barcodeFulfillmentReport&&(this.model.barcodeFulfillmentReport=n.barcodeFulfillmentReport),void 0!==n.barcodePrintedTicket&&(this.model.barcodePrintedTicket=n.barcodePrintedTicket),this.model.setBarcodeField(n.barcodeField)}getInitialFormValues(){const n={active:this.model.active,name:this.model.name};return this.model.name&&(n.fields=this.model.fields),this.model.needsChildFields()&&(n.childFields=this.model.childFields),this.useBarcodes&&(n.barcodeField=this.model.barcodeField,n.barcodeEmailConfirmation=this.model.barcodeEmailConfirmation,n.barcodeFulfillmentReport=this.model.barcodeFulfillmentReport,n.barcodePrintedTicket=this.model.barcodePrintedTicket),n}handleControls(){return[{add:!!this.model.name,formKey:"fields",getControl:()=>new m.MJ,patch:this.model.fields},{add:v.needsChildFields(this.model.name),formKey:le,getControl:()=>new m.MJ,patch:this.model.childFields}]}handleFieldChoices(){this.useBarcodes&&this.barcodeChoices.next(this.model.allFields)}static \u0275fac=function(t){return new(t||q)(e.rXU(V.E),e.rXU(y),e.rXU(O),e.rXU(pe.h))};static \u0275cmp=e.VBU({type:q,selectors:[["admin-account-type-edit"]],inputs:{model:"model"},features:[e.Vt3],decls:8,vars:5,consts:[[1,"page-wrap"],[3,"nsControl"],[1,"label-text"],["label","Account Fields",3,"formControl",4,"ngIf"],["label","Student's Fields",3,"children","formControl",4,"ngIf"],["class","page-wrap",4,"ngIf"],["label","Account Fields",3,"formControl"],["label","Student's Fields",3,"children","formControl"],[3,"nsControl",4,"ngIf"],[1,"barcode-checkboxes"]],template:function(t,i){1&t&&(e.j41(0,"div",0),e.nrm(1,"ns-form-control",1),e.j41(2,"div",2),e.EFF(3,"Account Type Status"),e.k0s(),e.nrm(4,"ns-form-control",1),e.k0s(),e.DNE(5,qe,1,1,"admin-account-fields-edit",3)(6,et,1,2,"admin-account-fields-edit",4)(7,st,8,4,"div",5)),2&t&&(e.R7$(),e.Y8G("nsControl",i.nsForm.nsControls.name),e.R7$(3),e.Y8G("nsControl",i.nsForm.nsControls.active),e.R7$(),e.Y8G("ngIf",i.nsForm.nsControls.fields),e.R7$(),e.Y8G("ngIf",i.nsForm.nsControls.childFields),e.R7$(),e.Y8G("ngIf",i.useBarcodes))},dependencies:[U.c,h.bT,R,m.X1,m.BC,m.l_],styles:['.label-text[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%], .label-text[_ngcontent-%COMP%]{font-family:"Roboto",-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;font-size:1.4rem;font-weight:400;letter-spacing:.025rem;line-height:1.8rem}.label-text[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%], .label-text[_ngcontent-%COMP%]{font-weight:500}.label-text[_ngcontent-%COMP%], .label-text[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%]{font-family:"Roboto",-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;font-size:1.4rem;font-weight:400;letter-spacing:.025rem;line-height:1.8rem}.label-text[_ngcontent-%COMP%], .label-text[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%]{font-weight:500}.label-text[_ngcontent-%COMP%]{display:block;padding:0 .6rem .8rem 0}.label-text[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%]{color:#de465a}
1.visibly-hidden.label-text[_ngcontent-%COMP%]:not(:focus):not(:active){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.page-wrap[_ngcontent-%COMP%]{max-width:88rem;padding:0 2.4rem}ns-form-control[_ngcontent-%COMP%], admin-account-fields-edit[_ngcontent-%COMP%]{display:block;margin-bottom:2.4rem}.barcode-checkboxes[_ngcontent-%COMP%]{margin-bottom:2.4rem}.barcode-checkboxes[_ngcontent-%COMP%]   ns-form-control[_ngcontent-%COMP%]{margin-bottom:0}']})};A=function(o,n,t,i){var c,s=arguments.length,r=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(o,n,t,i);else for(var f=o.length-1;f>=0;f--)(c=o[f])&&(r=(s<3?c(r):s>3?c(n,t,r):c(n,t))||r);return s>3&&r&&Object.defineProperty(n,t,r),r}([(0,M.P)(),function(o,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata("design:paramtypes",n)}(0,[V.E,y,O,pe.h])],A);var S=a(90992),b=a(87489),X=a(99364),he=a(30036);function lt(o,n){if(1&o&&(e.j41(0,"admin-edit",1),e.nrm(1,"admin-account-type-edit",2),e.k0s()),2&o){const t=e.XpG();e.Y8G("config",t.config),e.R7$(),e.Y8G("model",t.accountType)}}let P=class ee{route;auth;service;accountType;config;subscription=new L.yU;constructor(n,t,i){this.route=n,this.auth=t,this.service=i}ngOnInit(){this.subscription.add(this.route.data.subscribe(n=>{this.accountType=n.model?n.model.copy():new v({nutrislice_org:this.auth.get().actingOrg.id}),this.config={apiService:this.service,model:this.accountType,resource:b.wY}}))}static \u0275fac=function(t){return new(t||ee)(e.rXU(S.nX),e.rXU(X.u),e.rXU(y))};static \u0275cmp=e.VBU({type:ee,selectors:[["admin-account-type-edit-page"]],decls:1,vars:1,consts:[[3,"config",4,"ngIf"],[3,"config"],[3,"model"]],template:function(t,i){1&t&&e.DNE(0,lt,2,2,"admin-edit",0),2&t&&e.Y8G("ngIf",i.config)},dependencies:[h.bT,he.i,A],encapsulation:2})};P=function(o,n,t,i){var c,s=arguments.length,r=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(o,n,t,i);else for(var f=o.length-1;f>=0;f--)(c=o[f])&&(r=(s<3?c(r):s>3?c(n,t,r):c(n,t))||r);return s>3&&r&&Object.defineProperty(n,t,r),r}([(0,M.P)(),function(o,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata("design:paramtypes",n)}(0,[S.nX,X.u,y])],P);var ct=a(37635);class dt extends ct.e{updater;constructor(n){super(),this.updater=n}dataFetched(){this.list&&this.updater(this.list.totalRows===Object.keys(g).length)}}var ge=a(56275),Ce=a(21037),Fe=a(7190),mt=a(68999),be=a(36203),k=a(51611),ye=a(77616),ve=a(91297);let _e=(()=>{class o{config;createButtonDisabled=!1;constructor(t,i){const s=new be.Q([new k.T("Name",r=>r.nameFriendly),new mt.n("Active",r=>r.active),new Fe.Y([{action:r=>t.toggleActive(!1,r).pipe((0,u.T)(()=>({message:`${r.name} deactivated`,postSuccess:[Ce.f.RefreshList],success:!0}))),disabled:r=>r.lastActive,label:"Deactivate",visible:r=>r.active},{action:r=>t.toggleActive(!0,r).pipe((0,u.T)(()=>({message:`${r.name} activated`,postSuccess:[Ce.f.RefreshList],success:!0}))),label:"Activate",visible:r=>!r.active},i.generateDelete(b.wY.label,t,b.wY.permission.Delete)],b.wY)],null,!1);this.config=new ye.R(t,b.wY,s).setActor(new dt(r=>{this.createButtonDisabled=r})).setCreateButtonDisable(()=>this.createButtonDisabled).setSearchComponentVisibility(!1)}static \u0275fac=function(i){return new(i||o)(e.rXU(y),e.rXU(ge.c))};static \u0275cmp=e.VBU({type:o,selectors:[["admin-account-type-list"]],decls:1,vars:1,consts:[[3,"config"]],template:function(i,s){1&i&&e.nrm(0,"admin-list",0),2&i&&e.Y8G("config",s.config)},dependencies:[ve.s],encapsulation:2})}return o})();var D=a(47515),Ee=a(10136),H=a(43372),Oe=a(685);const ut=(0,Oe.T)(y,`${Ee.C1}/${H.C}`);var Pe=a(74288);const ft=[{path:`${H.C}`,canActivate:[Pe.EJ],children:[{path:"create",component:P},{path:":id/edit",component:P,resolve:{model:ut}},{path:"",component:_e}]}];let pt=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e.$C({type:o});static \u0275inj=e.G2t({imports:[D.iI.forChild(ft),D.iI]})}return o}
1)();var Te=a(84064),Me=a(88130);let ht=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e.$C({type:o});static \u0275inj=e.G2t({providers:[O,y],imports:[h.MD,_.ad,m.X1,pt,Me.f,Te.v,w,R,A,P,_e]})}return o})();var K=a(60211),gt=a(42614),N=a(99388),Ct=a(865);let we=(()=>{class o{copyToClipboardService;document;constructor(t,i){this.copyToClipboardService=t,this.document=i}bulkCopyCustomerEmail(t){return this.copyToClipboardService.copyToClipboard(t.map(i=>i.name).join(", ")),(0,N.of)({message:`${t.length} emails have been successfully copied to your clipboard`,success:!0})}copyCustomerEmail(t){return this.copyToClipboardService.copyToClipboard(t.email),(0,N.of)({message:`${t.email} was successfully copied to your clipboard`,success:!0})}static \u0275fac=function(i){return new(i||o)(e.KVO(Ct.H),e.KVO(gt.q))};static \u0275prov=e.jDH({token:o,factory:o.\u0275fac})}return o})();var $=a(21401);class G{data;constructor(n){this.data=n}get accountType(){return C.capitalize(this.data.account_type)}get created(){return this.data.create_date_time?$(this.data.create_date_time):void 0}get customerId(){return this.data.customer_id}get email(){return this.data.email}get firstName(){return this.data.first_name}get id(){return this.data.id}get lastModified(){return this.data.modified_date_time?$(this.data.modified_date_time):void 0}get lastModifiedBy(){return this.data.last_modified_by_username}get lastName(){return this.data.last_name}get lastLogin(){return this.data.last_login_date_time?$(this.data.last_login_date_time):void 0}get name(){return this.data.email}get orgSpecificFields(){return this.data.org_specific_fields}get phoneNumber(){return this.data.phone_number}get profileInfo(){return this.data.user_profiles_list}copy(){return(0,C.cloneDeep)(this)}toJSON(){return(0,C.cloneDeep)(this.data)}}let T=(()=>{class o extends j.G{base;batchDeleteEP;clearCbordTokenEP;exportEP;specificEP;constructor(t,i){super(t,i),this.base=new me.Y("customer-list"),this.batchDeleteEP=this.base.child("batch_delete"),this.clearCbordTokenEP=this.base.child("clear_cbord_token"),this.exportEP=this.base.child("export"),this.specificEP=this.base.child(":id")}delete(t){return this._delete(this.specificEP,{},{id:t.id})}deleteBulk(t){return this._post({ep:this.batchDeleteEP,payload:{objs:t.map(i=>i.id)}})}export(){return this._post({ep:this.exportEP,payload:{}})}clearCbordToken(t){return this._post({ep:this.clearCbordTokenEP,payload:{customer_id:t}})}get(t){return this._get(this.specificEP,{},{id:t}).pipe((0,u.T)(i=>new G(i)))}list(t){let i={};return t&&(i=t.toQueryParams()),this._get(this.base,i).pipe((0,u.T)(s=>this.handleListResponse(s,r=>r.map(c=>new G(c)))))}save(t){const i=t.toJSON();let s;return s=t.id?this._patch(this.specificEP,i,{id:t.id}):this._post({ep:this.base,payload:i}),s.pipe((0,u.T)(r=>new G(r)))}static \u0275fac=function(i){return new(i||o)(e.KVO(I.Qq),e.KVO(x.s))};static \u0275prov=e.jDH({token:o,factory:o.\u0275fac})}return o})();var Re=a(4605),Ft=a(19204);let je=(()=>{class o extends j.G{base;specificEP;constructor(t,i,s){super(t,i),s.getEndpoint("order-history").subscribe(r=>{this.base=r,this.specificEP=this.base.child(":id")})}getOrderHistory(t){return this._get(this.specificEP,{},{id:t}).pipe((0,u.T)(i=>this.handleListResponse(i,s=>s.map(r=>new Ft.I(r,{cancellationReason:"",orderType:"",paymentType:"",statusName:""})))))}static \u0275fac=function(i){return new(i||o)(e.KVO(I.Qq),e.KVO(x.s),e.KVO(Re.P))};static \u0275prov=e.jDH({token:o,factory:o.\u0275fac})}return o})();class bt{data;constructor(n){this.data=n}get date(){return $(this.data.last_attempt_time).format("MM.DD.YY")}get name(){return this.data.type}get success(){return this.data.success}get successText(){return this.data.success?"Success":"Failed"}copy(){return(0,C.cloneDeep)(this)}toJSON(){return(0,C.cloneDeep)(this.data)}}let xe=(()=>{class o extends j.G{base;constructor(t,i,s){super(t,i),s.getEndpoint("email-records").subscribe(r=>{this.base=r})}quickList(t){return this._get(this.base,{email:t}).pipe((0,u.T)(i=>i.map(s=>new bt(s))))}static \u0275fac=function(i){return new(i||o)(e.KVO(I.Qq),e.KVO(x.s),e.KVO(Re.P))};static \u0275prov=e.jDH({token:o,factory:o.\u0275fac})}return o}
1)();var yt=a(3822);function vt(o,n){if(1&o&&(e.j41(0,"li")(1,"span",4),e.EFF(2),e.k0s(),e.j41(3,"span",5),e.EFF(4),e.k0s()()),2&o){const t=n.$implicit;e.R7$(2),e.SpI(" ",t.key," "),e.R7$(2),e.SpI(" ",t.value," ")}}function _t(o,n){if(1&o&&(e.j41(0,"li")(1,"span",5),e.EFF(2),e.k0s()()),2&o){const t=n.$implicit;e.R7$(2),e.SpI(" ",t.value," ")}}function Et(o,n){if(1&o&&(e.j41(0,"ul",3)(1,"li")(2,"span",5),e.EFF(3),e.k0s()(),e.j41(4,"li")(5,"span",5),e.EFF(6),e.k0s()(),e.j41(7,"li")(8,"span",5),e.EFF(9),e.k0s()(),e.DNE(10,_t,3,1,"li",6),e.nI1(11,"keyvalue"),e.j41(12,"li")(13,"span",5),e.EFF(14),e.k0s()()()),2&o){const t=n.$implicit;e.R7$(3),e.SpI(" ",t.first_name," "),e.R7$(3),e.SpI(" ",t.last_name," "),e.R7$(3),e.SpI(" ",t.email," "),e.R7$(),e.Y8G("ngForOf",e.bMT(11,5,t.org_specific_fields)),e.R7$(4),e.SpI(" ",t.account_type," ")}}function Ot(o,n){if(1&o&&(e.j41(0,"tr")(1,"td"),e.EFF(2),e.k0s(),e.j41(3,"td"),e.EFF(4),e.k0s(),e.j41(5,"td"),e.EFF(6),e.k0s(),e.j41(7,"td"),e.EFF(8),e.k0s(),e.j41(9,"td"),e.EFF(10),e.nI1(11,"currency"),e.k0s()()),2&o){const t=n.$implicit;e.R7$(2),e.SpI(" ",t.locationName," "),e.R7$(2),e.SpI(" ",t.itemSummaryText," "),e.R7$(2),e.SpI("Order for ",t.profileName,""),e.R7$(2),e.SpI(" ",t.readyBy," "),e.R7$(2),e.SpI(" ",e.bMT(11,5,t.total)," ")}}function Pt(o,n){if(1&o&&(e.j41(0,"tr")(1,"td"),e.EFF(2),e.k0s(),e.j41(3,"td"),e.EFF(4),e.k0s(),e.j41(5,"td"),e.EFF(6),e.k0s()()),2&o){const t=n.$implicit;e.R7$(2),e.SpI(" ",t.name," "),e.R7$(2),e.SpI(" ",t.successText," "),e.R7$(2),e.SpI(" ",t.date," ")}}let Ie=(()=>{class o{data;dialogRef;customerListService;orderHistoryService;emailHistoryService;buttons;customerInfo;emailHistory;orderHistory;constructor(t,i,s,r,c){this.data=t,this.dialogRef=i,this.customerListService=s,this.orderHistoryService=r,this.emailHistoryService=c,this.buttons=[{action:()=>this.dialogRef.close(),text:"Done"}]}ngOnInit(){this.customerListService.get(this.data.model.id).subscribe(t=>{this.customerInfo=t}),this.orderHistoryService.getOrderHistory(this.data.model.customerId).subscribe(t=>{this.orderHistory=t.results}),this.emailHistoryService.quickList(this.data.model.email).subscribe(t=>{this.emailHistory=t})}static \u0275fac=function(i){return new(i||o)(e.rXU(K.e),e.rXU(K.m),e.rXU(T),e.rXU(je),e.rXU(xe))};static \u0275cmp=e.VBU({type:o,selectors:[["admin-customer-audit-log"]],decls:92,vars:16,consts:[["dialogTitle","Customer Details",3,"dialogButtons"],[1,"content-wrapper"],[1,"info-container"],[1,"fields-wrapper"],[1,"text-label"],[1,"text-body"],[4,"ngFor","ngForOf"],["class","fields-wrapper",4,"ngFor","ngForOf"],[1,"fields-wrapper-left"],[1,"history-wrapper"],[1,"info-table"]],template:function(i,s){1&i&&(e.j41(0,"ns-dialog-content",0)(1,"div",1)(2,"div",2)(3,"h2"),e.EFF(4,"Customer Info"),e.k0s(),e.j41(5,"ul",3)(6,"li")(7,"span",4),e.EFF(8," First Name "),e.k0s(),e.j41(9,"span",5),e.EFF(10),e.k0s()(),e.j41(11,"li")(12,"span",4),e.EFF(13," Last Name "),e.k0s(),e.j41(14,"span",5),e.EFF(15),e.k0s()(),e.j41(16,"li")(17,"span",4),e.EFF(18," Email "),e.k0s(),e.j41(19,"span",5),e.EFF(20),e.k0s()(),e.DNE(21,vt,5,2,"li",6),e.nI1(22,"keyvalue"),e.j41(23,"li")(24,"span",4),e.EFF(25," Account Type "),e.k0s(),e.j41(26,"span",5),e.EFF(27),e.k0s()()(),e.DNE(28,Et,15,7,"ul",7),e.k0s(),e.j41(29,"div",2)(30,"h2"),e.EFF(31,"Account Info"),e.k0s(),e.j41(32,"ul",8)(33,"li")(34,"span",4),e.EFF(35," Phone Number "),e.k0s(),e.j41(36,"span",5),e.EFF(37),e.k0s()(),e.j41(38,"li")(39,"span",4),e.EFF(40," Customer ID "),e.k0s(),e.j41(41,"span",5),e.EFF(42),e.k0s()()(),e.j41(43,"ul",3)(44,"li")(45,"span",4),e.EFF(46," Account Created "),e.k0s(),e.j41(47,"span",5),e.EFF(48),e.k0s()(),e.j41(49,"li")(50,"span",4),e.EFF(51," Last Edited Date "),e.k0s(),e.j41(52,"span",5),e.EFF(53),e.k0s()(),e.j41(54,"li")(55,"span",4),e.EFF(56," Last Edited By "),e.k0s(),e.j41(57,"span",5),e.EFF(58),e.k0s()()()(),e.j41(59,"div",9)(60,"div",2)(61,"h3"),e.EFF(62,"Order History"),e.k0s(),e.j41(63,"table",10)(64,"thead")(65,"tr")(66,"th"),e.EFF(67,"Location"),e.k0s(),e.j41(68,"th"),e.EFF(69,"Order"),e.k0s(),e.j41(70,"th"),e.EFF(71,"Name"),e.k0s(),e.j41(72,"th"),e.EFF(73,"Date"),e.k0s(),e.j41(74,"th"),e.EFF(75,"Price"),e.k0s()()(),e.j41(76,"tbody"),e.DNE(77,Ot,12,7,"tr",6),e.k0s()()(),e.j41(78,"div",2)(79,"h3"),e.EFF(80,"Email History"),e.k0s(),e.j41(81,"table",10)(82,"thead")(83,"tr")(84,"th"),e.EFF(85,"Email Name/Type"),e.k0s(),e.j41(86,"th"),e.EFF(87,"Status"),e.k0s(),e.j41(88,"th"),e.EFF(89,"Date Sent"),e.k0s()()(),e.j41(90,"tbody"),e.DNE(91,Pt,7,3,"tr",6),e.k0s()()()()()()),2&i&&(e.Y8G("dialogButtons",s.buttons),e.R7$(10),e.SpI(" ",s.customerInfo.firstName," "),e.R7$(5),e.SpI(" ",s.customerInfo.lastName," "),e.R7$(5),e.SpI(" ",s.customerInfo.email," "),e.R7$(),e.Y8G("ngForOf",e.bMT(22,14,s.customerInfo.orgSpecificFields)),e.R7$(6),e.SpI(" ",s.customerInfo.accountType," "),e.R7$(),e.Y8G("ngForOf",s.customerInfo.profileInfo),e.R7$(9),e.SpI(" ",s.customerInfo.phoneNumber," "),e.R7$(5),e.SpI(" ",s.customerInfo.customerId," "),e.R7$(6),e.SpI(" ",s.customerInfo.created," "),e.R7$(5),e.SpI(" ",s.customerInfo.lastModified," "),e.R7$(5),e.SpI(" ",s.customerInfo.lastModifiedBy," "),e.R7$(19),e.Y8G("ngForOf",s.orderHistory),e.R7$(14),e.Y8G("ngForOf",s.emailHistory))},dependencies:[yt.G,h.Sq,h.oe,h.lG],styles:['.info-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%], .text-label[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%], .info-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .text-label[_ngcontent-%COMP%]{font-family:"Roboto",-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;font-size:1.4rem;font-weight:400;letter-spacing:.025rem;line-height:1.8rem}.info-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%], .text-label[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%], .info-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .text-label[_ngcontent-%COMP%]{font-weight:500}h3[_ngcontent-%COMP%]{border-bottom:.1rem solid rgba(0,0,0,.6);font-family:"Roboto",-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;font-size:2.4rem;font-weight:400;line-height:3.2rem;padding-bottom:.7rem}h2[_ngcontent-%COMP%]{font-family:"Rubik",-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;font-size:1.8rem;font-weight:700;line-height:2.2rem}.text-body[_ngcontent-%COMP%]{font-family:"Roboto",-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;font-size:1.6rem;font-weight:400;line-height:2.2rem}.info-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .text-label[_ngcontent-%COMP%], .info-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%], .text-label[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%]{font-family:"Roboto",-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;font-size:1.4rem;font-weight:400;letter-spacing:.025rem;line-height:1.8rem}.info-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .text-label[_ngcontent-%COMP%], .info-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%], .text-label[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%]{font-weight:500}.info-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .text-label[_ngcontent-%COMP%]{display:block;padding:0 .6rem .8rem 0}.info-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%], .text-label[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%]{color:#de465a}.info-table[_ngcontent-%COMP%]   th.visibly-hidden[_ngcontent-%COMP%]:not(:focus):not
1(:active), .visibly-hidden.text-label[_ngcontent-%COMP%]:not(:focus):not(:active){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%]{margin:0;margin-bottom:.8rem}.content-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.fields-wrapper[_ngcontent-%COMP%], .fields-wrapper-left[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.fields-wrapper[_ngcontent-%COMP%]   li[_ngcontent-%COMP%], .fields-wrapper-left[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:.8rem;margin-right:.8rem;min-width:12.8rem}.fields-wrapper-left[_ngcontent-%COMP%]{justify-content:left}.history-wrapper[_ngcontent-%COMP%]{overflow:auto}.info-container[_ngcontent-%COMP%]{margin-bottom:2.4rem}.info-table[_ngcontent-%COMP%]{width:100%}.info-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{display:table-cell;text-align:left}']})}return o})();function Tt(o,n){if(1&o&&e.nrm(0,"ns-form-control",1),2&o){const t=n.$implicit,i=e.XpG();e.Y8G("nsControl",i.nsForm.nsControls[t])}}let Mt=(()=>{class o extends ue.G{customFieldKeys=[];model;nsForm;constructor(t){super(t)}buildForm(){const t={firstName:new p.l(p.g.Text,{label:"First Name",disabled:!!this.model.id}),lastName:new p.l(p.g.Text,{label:"Last Name",disabled:!!this.model.id}),email:new p.l(p.g.Email,{label:"Email",disabled:!!this.model.id}),accountType:new p.l(p.g.Text,{label:"Account Type",disabled:!!this.model.id})};return Object.keys(this.model.orgSpecificFields).length&&Object.assign(t,this.getCustomFieldInputs()),new B.$(t)}
1formChange(t){C.forEach(this.customFieldKeys,i=>{this.model.orgSpecificFields[i]=t[i]})}getInitialFormValues(){return{accountType:this.model.accountType,email:this.model.email,firstName:this.model.firstName,lastName:this.model.lastName,...this.model.orgSpecificFields}}getCustomFieldInputs(){const t={};return C.forEach(this.model.orgSpecificFields,(i,s)=>{t[s]=new p.l(p.g.Text,{label:s}),this.customFieldKeys.push(s)}),t}static \u0275fac=function(i){return new(i||o)(e.rXU(V.E))};static \u0275cmp=e.VBU({type:o,selectors:[["admin-customer-list-edit"]],inputs:{model:"model"},features:[e.Vt3],decls:6,vars:5,consts:[[1,"page-wrapper"],[3,"nsControl"],[3,"nsControl",4,"ngFor","ngForOf"]],template:function(i,s){1&i&&(e.j41(0,"div",0),e.nrm(1,"ns-form-control",1)(2,"ns-form-control",1)(3,"ns-form-control",1)(4,"ns-form-control",1),e.DNE(5,Tt,1,1,"ns-form-control",2),e.k0s()),2&i&&(e.R7$(),e.Y8G("nsControl",s.nsForm.nsControls.firstName),e.R7$(),e.Y8G("nsControl",s.nsForm.nsControls.lastName),e.R7$(),e.Y8G("nsControl",s.nsForm.nsControls.email),e.R7$(),e.Y8G("nsControl",s.nsForm.nsControls.accountType),e.R7$(),e.Y8G("ngForOf",s.customFieldKeys))},dependencies:[U.c,h.Sq],styles:[".page-wrapper[_ngcontent-%COMP%]{max-width:88rem;padding:0 2.4rem}ns-form-control[_ngcontent-%COMP%]{padding:.8rem}"]})}return o})();function wt(o,n){if(1&o&&(e.j41(0,"admin-edit",1),e.nrm(1,"admin-customer-list-edit",2),e.k0s()),2&o){const t=n.ngIf;e.Y8G("config",t),e.R7$(),e.Y8G("model",t.model)}}let J=(()=>{class o{route;service;config$;constructor(t,i){this.route=t,this.service=i}ngOnInit(){const t=this.route.data.pipe((0,u.T)(i=>i.model||new G({})));this.config$=t.pipe((0,u.T)(i=>({apiService:this.service,model:i,resource:b.VH,showSaveProgress:!1})))}static \u0275fac=function(i){return new(i||o)(e.rXU(S.nX),e.rXU(T))};static \u0275cmp=e.VBU({type:o,selectors:[["admin-customer-list-edit-page"]],decls:2,vars:3,consts:[[3,"config",4,"ngIf"],[3,"config"],[3,"model"]],template:function(i,s){1&i&&(e.DNE(0,wt,2,2,"admin-edit",0),e.nI1(1,"async")),2&i&&e.Y8G("ngIf",e.bMT(1,1,s.config$))},dependencies:[h.bT,he.i,Mt,h.Jj],encapsulation:2})}return o})();var Rt=a(17862),jt=a(14360),xt=a(14772),It=a(46353),At=a(61010),St=a(587),kt=a(63770);let Ae=(()=>{class o{accountTypeService;authService;copyCustomerEmailService;dialog;genericActionFactory;router;service;config;user;constructor(t,i,s,r,c,f,z){this.accountTypeService=t,this.authService=i,this.copyCustomerEmailService=s,this.dialog=r,this.genericActionFactory=c,this.router=f,this.service=z,this.user=this.authService.get();const Bt=new be.Q([new k.T("First Name",d=>d.firstName),new k.T("Last Name",d=>d.lastName),new At.l("Email",d=>d.email),new k.T("Account Type",d=>d.accountType),new It.F("Last Login",d=>d.lastLogin),new Fe.Y([{action:d=>(this.router.navigate(b.VH.editNavigate(d.id)),(0,N.of)({success:!0})),label:"Edit"},{action:d=>s.copyCustomerEmail(d),label:"Copy Email Address"},{action:d=>this.service.clearCbordToken(d.customerId).pipe((0,u.T)(()=>({message:`Token Cleared Successfully for ${d.email}.`,success:!0})),(0,Rt.W)(Xt=>{let Q;return Q=404===Xt.status?`${d.email} does not have a CBORD payment token to clear.`:`Unable to clear token for ${d.email}.`,(0,N.of)({message:Q,success:!1})})),label:"Clear CBORD Token",visible:()=>this.user.isSuperUser()},c.generateDelete("User",z,void 0,void 0,"Remove User","was successfully removed from your organization")],b.VH,!1,!1,"Action",{labelGetter:d=>"View",action:d=>r.openLarge(Ie,{data:{model:d}}).pipe((0,u.T)(()=>({success:!0})))})],null),Ut=[{action:()=>this.service.export().pipe((0,u.T)(()=>({success:!0}))),label:"Export All"}],Yt=[this.genericActionFactory.generateBulkDelete("Customers",this.service,void 0,"Remove Users"),{action:d=>s.bulkCopyCustomerEmail(d),label:"Copy Email Addresses"}],Vt=new St._([new xt.i("Last Login Date",{format:"YYYY-M-D",range:{endUrlParam:"last_login_end",startUrlParam:"last_login_start"},today:{additionalParams:()=>({includes_today:!0}),param:"current_date"}}),new jt.N("Account Type","account_type",()=>this.accountTypeService.quickList(),d=>C.capitalize(d.name),d=>`${d.id}`)]);this.config=new ye.R(z,b.VH,Bt,Ut,Yt,Vt)}static \u0275fac=function(i){return new(i||o)(e.rXU(y),e.rXU(X.u),e.rXU(we),e.rXU(kt.R),e.rXU(ge.c),e.rXU(S.Ix),e.rXU(T))};static \u0275cmp=e.VBU({type:o,selectors:[["admin-customer-list-list"]],decls:1,vars:1,consts:[[3,"config"]],template:function(i,s){1&i&&e.nrm(0,"admin-list",0),2&i&&e.Y8G("config",s.config)},dependencies:[ve.s],encapsulation:2})}return o}
1)();const Dt=(0,Oe.T)(T,`${Ee.C1}/${H.X}`),Nt=[{path:"customer-list",canActivate:[Pe.EJ],children:[{path:"create",component:J},{path:":id/edit",component:J,resolve:{model:Dt}},{path:"",component:Ae}]}];let $t=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e.$C({type:o});static \u0275inj=e.G2t({imports:[D.iI.forChild(Nt),D.iI]})}return o})(),Gt=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e.$C({type:o});static \u0275inj=e.G2t({providers:[we,T,xe,je],imports:[h.MD,K.n,m.X1,$t,Me.f,Te.v,Ie,J,Ae]})}return o})(),Lt=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e.$C({type:o});static \u0275inj=e.G2t({imports:[ht,Gt]})}return o})()}}]);

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.