1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[8911],{585:(w,v,m)=>{m.d(v,{H:()=>s});const s="assets/shovel-icons/minecart-loaded.svg"},4601:(w,v,m)=>{m.d(v,{U:()=>T});var h=m(5861),s=m(2634),c=m(7359);const I={toFirestore(f){let P={...f};return"docId"in P&&delete P.docId,P},fromFirestore:(f,P)=>({...f.data(P),docId:f.id})};var g=m(8256);let T=(()=>{class f{constructor(_){this.firestore=_}getDropoffMaterialList(){var _=this;return(0,h.Z)(function*(){let y=yield(0,s.getDocsFromServer)((0,s.query)((0,s.collection)(_.firestore,c.AZ),(0,s.where)("testMaterial","==",!1),(0,s.where)("title","!=","Haulback")).withConverter(I));return y.empty?[]:y.docs.map(b=>b.data())})()}getAllMaterialList(){return(0,s.getDocsFromServer)((0,s.query)((0,s.collection)(this.firestore,c.AZ),(0,s.where)("testMaterial","==",!1)).withConverter(I))}getAvailableMaterials(_){var y=this;return(0,h.Z)(function*(){let b=(yield y.getAllMaterialList()).docs.map(x=>x.data()),A=[];return b.forEach(x=>{_.includes(x.docId)||A.push(x)}),A})()}}return f.\u0275fac=function(_){return new(_||f)(g.LFG(s.Firestore))},f.\u0275prov=g.Yz7({token:f,factory:f.\u0275fac}),f})()},8911:(w,v,m)=>{m.r(v),m.d(v,{PitMaterialCatalogPageModule:()=>de});var h=m(6895),s=m(433),c=m(1082),I=m(4979),g=m(5861),T=m(7579),f=m(2722),P=m(3900),_=m(9646),y=m(9300),b=m(5698),A=m(585),x=m(7423),M=(()=>{return(o=M||(M={})).Prompt="PROMPT",o.Camera="CAMERA",o.Photos="PHOTOS",M;var o})(),Z=(()=>{return(o=Z||(Z={})).Rear="REAR",o.Front="FRONT",Z;var o})(),O=(()=>{return(o=O||(O={})).Uri="uri",o.Base64="base64",o.DataUrl="dataUrl",O;var o})();class U extends x.Uw{getPhoto(r){var t=this;return(0,g.Z)(function*(){return new Promise(function(){var i=(0,g.Z)(function*(n,a){if(r.webUseInput||r.source===M.Photos)t.fileInputExperience(r,n,a);else if(r.source===M.Prompt){let l=document.querySelector("pwa-action-sheet");l||(l=document.createElement("pwa-action-sheet"),document.body.appendChild(l)),l.header=r.promptLabelHeader||"Photo",l.cancelable=!1,l.options=[{title:r.promptLabelPhoto||"From Photos"},{title:r.promptLabelPicture||"Take Picture"}],l.addEventListener("onSelection",function(){var p=(0,g.Z)(function*(d){0===d.detail?t.fileInputExperience(r,n,a):t.cameraExperience(r,n,a)});return function(d){return p.apply(this,arguments)}}())}else t.cameraExperience(r,n,a)});return function(n,a){return i.apply(this,arguments)}}())})()}pickImages(r){var t=this;return(0,g.Z)(function*(){return new Promise(function(){var i=(0,g.Z)(function*(n,a){t.multipleFileInputExperience(n,a)});return function(n,a){return i.apply(this,arguments)}}())})()}cameraExperience(r,t,i){var n=this;return(0,g.Z)(function*(){if(customElements.get("pwa-camera-modal")){const a=document.createElement("pwa-camera-modal");a.facingMode=r.direction===Z.Front?"user":"environment",document.body.appendChild(a);try{yield a.componentOnReady(),a.addEventListener("onPhoto",function(){var l=(0,g.Z)(function*(p){const d=p.detail;null===d?i(new x.xz("User cancelled photos app")):d instanceof Error?i(d):t(yield n._getCameraPhoto(d,r)),a.dismiss(),document.body.removeChild(a)});return function(p){return l.apply(this,arguments)}}()),a.present()}catch{n.fileInputExperience(r,t,i)}}else console.error("Unable to load PWA Element 'pwa-camera-modal'. See the docs: https://capacitorjs.com/docs/web/pwa-elements."),n.fileInputExperience(r,t,i)})()}fileInputExperience(r,t,i){let n=document.querySelector("#_capacitor-camera-input");const a=()=>{var l;null===(l=n.parentNode)||void 0===l||l.removeChild(n)};n||(n=document.createElement("input"),n.id="_capacitor-camera-input",n.type="file",n.hidden=!0,document.body.appendChild(n),n.addEventListener("change",l=>{const p=n.files[0];let d="jpeg";if("image/png"===p.type?d="png":"image/gif"===p.type&&(d="gif"),"dataUrl"===r.resultType||"base64"===r.resultType){const u=new FileReader;u.addEventListener("load",()=>{if("dataUrl"===r.resultType)t({dataUrl:u.result,format:d});else if("base64"===r.resultType){const C=u.result.split(",")[1];t({base64String:C,format:d})}a()}),u.readAsDataURL(p)}else t({webPath:URL.createObjectURL(p),format:d}),a()}),n.addEventListener("cancel",l=>
1{i(new x.xz("User cancelled photos app")),a()})),n.accept="image/*",n.capture=!0,r.source===M.Photos||r.source===M.Prompt?n.removeAttribute("capture"):r.direction===Z.Front?n.capture="user":r.direction===Z.Rear&&(n.capture="environment"),n.click()}multipleFileInputExperience(r,t){let i=document.querySelector("#_capacitor-camera-input-multiple");const n=()=>{var a;null===(a=i.parentNode)||void 0===a||a.removeChild(i)};i||(i=document.createElement("input"),i.id="_capacitor-camera-input-multiple",i.type="file",i.hidden=!0,i.multiple=!0,document.body.appendChild(i),i.addEventListener("change",a=>{const l=[];for(let p=0;p<i.files.length;p++){const d=i.files[p];let u="jpeg";"image/png"===d.type?u="png":"image/gif"===d.type&&(u="gif"),l.push({webPath:URL.createObjectURL(d),format:u})}r({photos:l}),n()}),i.addEventListener("cancel",a=>{t(new x.xz("User cancelled photos app")),n()})),i.accept="image/*",i.click()}_getCameraPhoto(r,t){return new Promise((i,n)=>{const a=new FileReader,l=r.type.split("/")[1];"uri"===t.resultType?i({webPath:URL.createObjectURL(r),format:l,saved:!1}):(a.readAsDataURL(r),a.onloadend=()=>{const p=a.result;i("dataUrl"===t.resultType?{dataUrl:p,format:l,saved:!1}:{base64String:p.split(",")[1],format:l,saved:!1})},a.onerror=p=>{n(p)})})}checkPermissions(){var r=this;return(0,g.Z)(function*(){if(typeof navigator>"u"||!navigator.permissions)throw r.unavailable("Permissions API not available in this browser");try{return{camera:(yield window.navigator.permissions.query({name:"camera"})).state,photos:"granted"}}catch{throw r.unavailable("Camera permissions are not available in this browser")}})()}requestPermissions(){var r=this;return(0,g.Z)(function*(){throw r.unimplemented("Not implemented on web.")})()}pickLimitedLibraryPhotos(){var r=this;return(0,g.Z)(function*(){throw r.unavailable("Not implemented on web.")})()}getLimitedLibraryPhotos(){var r=this;return(0,g.Z)(function*(){throw r.unavailable("Not implemented on web.")})()}}new U;const k=(0,x.fo)("Camera",{web:()=>new U});var e=m(8256),E=m(1481);const S=["fileInput"];function N(o,r){if(1&o&&e._UZ(0,"img",28),2&o){const t=e.oxw(2);e.Q6J("src",t.imageUri,e.LSH)}}function F(o,r){1&o&&(e.TgZ(0,"div",29),e._UZ(1,"ion-icon",30),e.TgZ(2,"span"),e._uU(3,"Tap to add photo"),e.qZA()())}function J(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"ion-button",31),e.NdJ("click",function(){e.CHM(t);const n=e.oxw(2);return e.KtG(n.removeImage())}
1),e._UZ(1,"ion-icon",32),e._uU(2," Remove Photo "),e.qZA()}}function D(o,r){if(1&o&&(e.TgZ(0,"ion-chip",33)(1,"ion-text")(2,"strong"),e._uU(3),e.qZA()()()),2&o){const t=e.oxw(2);e.xp6(3),e.Oqu(t.invalidMessage)}}function Y(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"form",6)(1,"p",7),e._uU(2,"Complete the form below and click "),e.TgZ(3,"strong"),e._uU(4,"Save Changes"),e.qZA(),e._uU(5,"."),e.qZA(),e.TgZ(6,"div",8)(7,"h3",9),e._uU(8,"Product"),e.qZA(),e.TgZ(9,"ion-item",10)(10,"ion-label"),e._uU(11),e.qZA()()(),e.TgZ(12,"div",8)(13,"h3",9),e._uU(14,"Pricing (per load)"),e.qZA(),e.TgZ(15,"ion-item",11),e._UZ(16,"ion-input",12),e.qZA(),e.TgZ(17,"ion-item",11),e._UZ(18,"ion-input",13),e.qZA(),e.TgZ(19,"ion-item",11),e._UZ(20,"ion-input",14),e.qZA(),e.TgZ(21,"ion-item",11),e._UZ(22,"ion-input",15),e.qZA()(),e.TgZ(23,"div",8)(24,"h3",9),e._uU(25,"Pricing (per yd\xb3)"),e.qZA(),e.TgZ(26,"ion-item",11),e._UZ(27,"ion-input",16),e.qZA()(),e.TgZ(28,"div",8)(29,"h3",9),e._uU(30,"Description"),e.qZA(),e.TgZ(31,"ion-item",17),e._UZ(32,"ion-textarea",18),e.qZA()(),e.TgZ(33,"div",8)(34,"h3",9),e._uU(35,"Product Photo"),e.qZA(),e.TgZ(36,"div",19),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.selectImage())}),e.YNc(37,N,1,1,"img",20),e.YNc(38,F,4,0,"div",21),e.qZA(),e.TgZ(39,"input",22,23),e.NdJ("change",function(n){e.CHM(t);const a=e.oxw();return e.KtG(a.onFileSelected(n))}),e.qZA(),e.YNc(41,J,3,0,"ion-button",24),e.qZA(),e.YNc(42,D,4,1,"ion-chip",25),e.TgZ(43,"ion-button",26),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.editMaterial())}),e._UZ(44,"ion-icon",27),e._uU(45," Save Changes "),e.qZA()()}if(2&o){const t=e.oxw();e.Q6J("formGroup",t.editForm),e.xp6(11),e.Oqu(t.catItem.materialTitle),e.xp6(26),e.Q6J("ngIf",t.imageUri),e.xp6(1),e.Q6J("ngIf",!t.imageUri),e.xp6(3),e.Q6J("ngIf",t.imageUri),e.xp6(1),e.Q6J("ngIf",!t.editForm.valid),e.xp6(1),e.Q6J("disabled",!t.editForm.valid)}}let z=(()=>{class o{constructor(t,i,n,a){this.fb=t,this.modalController=i,this.platform=n,this.sanitizer=a,this.imageUri=null,this.imageBase64=null,this.imageRemoved=!1}ngOnInit(){}ionViewWillEnter(){this.catItem.images&&this.catItem.images.length>0&&(this.imageUri=this.catItem.images[0]),this.editForm=this.fb.group({dualAxelPrice:[this.catItem.priceList.dualAxelPrice,s.kI.required],triAxelPrice:[this.catItem.priceList.triAxelPrice,s.kI.required],trailerPrice:[this.catItem.priceList.trailerPrice,s.kI.required],quadAxelPrice:[this.catItem.priceList.quadAxelPrice||0,s.kI.required],cubicYardPrice:[this.catItem.priceList.cubicYardPrice],description:[this.catItem.description]})}get invalidMessage(){let t="";for(const i in this.editForm.controls)if(this.editForm.get(i).invalid){t=i;break}switch(t){case"dualAxelPrice":return"Please enter pricing for a Dual Axle Truck";case"triAxelPrice":return"Please enter pricing for a Tri Axle Truck";case"trailerPrice":return"Please enter pricing for a Trailer";case"quadAxelPrice":return"Please enter pricing for a Quad Axle Truck";case"cubicYardPrice":return"Please enter pricing for cubic yards";case"description":return"Please enter a description";default:return"Please fill in all the fields"}}selectImage(){var t=this;return(0,g.Z)(function*(){if(t.platform.is("capacitor"))try{const i=yield k.getPhoto({quality:80,allowEditing:!1,resultType:O.Uri,source:M.Prompt});t.imageUri=i.webPath;const a=yield(yield fetch(i.webPath)).blob();t.imageBase64=yield t.blobToBase64(a),t.imageRemoved=!1}catch(i){console.log("Image selection cancelled or failed",i)}else t.fileInput.nativeElement.click()})()}onFileSelected(t){const i=t.target.files?.[0];i&&(this.imageUri=this.sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(i)),this.blobToBase64(i).then(n=>this.imageBase64=n),this.imageRemoved=!1)}removeImage(){this.imageUri=null,this.imageBase64=null,this.imageRemoved=!0}dismissModal(){this.modalController.dismiss({},"dismissed")}editMaterial(){const t={...this.editForm.value,description:this.editForm.get("description")?.value||this.catItem.description,imageBase64:this.imageBase64,removeImage:this.imageRemoved};this.modalController.dismiss(t,"confirmed")}blobToBase64(t){return new Promise((i,n)=>{const a=new FileReader;a.onloadend=()=>i(a.result.split(",")[1]),a.onerror=n,a.readAsDataURL(t)})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(s.qu),e.Y36(c.IN),e.Y36(c.t4),e.Y36(E.H7))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-edit-catalog-item-modal"]],viewQuery:function(t,i){if(1&t&&e.Gf(S,5),2&t){let n;e.iGM(n=e.CRH())&&(i.fileInput=n.first)}},inputs:{catItem:"catItem"},decls:9,vars:1,consts:[[1,"ion-no-border"],[1,"modal-title"],["slot","end"],["fill","clear",3,"click"],["slot","icon-only","name","close"],[3,"formGroup",4,"ngIf"],[3,"formGroup"],[1,"form-subtitle"],[1,"form-section"],[1,"section-label"],["lines","none",1,"form-item","disabled-item"],["lines","none",1,"form-item"],["type","number","placeholder","Dual Axle","formControlName","dualAxelPrice"],["type","number","placeholder","Tri Axle","formControlName","triAxelPrice"],["type","number","placeholder","Quad Axle","formControlName","quadAxelPrice"],["type","number","placeholder","Trailer","formControlName","trailerPrice"],["type","number","placeholder","Cubic Yards","formControlName","cubicYardPrice"],["lines","none",1,"form-item","textarea-item"],["placeholder","Enter description","autoGrow","true","formControlName","description","rows","4"],[1,"image-upload",3,"click"],["alt","Product photo","class","image-preview",3,"src",4,"ngIf"],["class","image-placeholder",4,"ngIf"],["type","file","accept","image/*","hidden","",3,"change"],["fileInput",""],["fill","clear","size","small","color","danger","class","remove-image-btn",3,"click",4,"ngIf"],["class","error-chip",4,"ngIf"],["expand","block","color","success",1,"save-button",3,"disabled","click"],["slot","start","name","checkmark-circle"],["alt","Product photo",1,"image-preview",3,"src"],[1,"image-placeholder"],["name","camera-outline"],["fill","clear","size","small","color","danger",1,"remove-image-btn",3,"click"],["slot","start","name","trash-outline"],[1,"error-chip"]],template:function(t,i){1&t&&(e.TgZ(0,"ion-header",0)(1,"ion-toolbar")(2,"ion-title",1),e._uU(3,"Edit Product"),e.qZA(),e.TgZ(4,"ion-buttons",2)(5,"ion-button",3),e.NdJ("click",function(){return i.dismissModal()}),e._UZ(6,"ion-icon",4),e.qZA()()()(),e.TgZ(7,"ion-content"),e.YNc(8,Y,46,7,"form",5),e.qZA()),2&t&&(e.xp6(8),e.Q6J("ngIf",i.editForm))}
1,dependencies:[h.O5,s._Y,s.JJ,s.JL,c.YG,c.Sm,c.hM,c.W2,c.Gu,c.gu,c.pK,c.Ie,c.Q$,c.yW,c.g2,c.wd,c.sr,c.as,c.j9,s.sg,s.u],styles:["ion-header[_ngcontent-%COMP%]{padding-top:70px}ion-header[_ngcontent-%COMP%] ion-toolbar[_ngcontent-%COMP%]{--background: white;--border-width: 0;--padding-start: 18px;--padding-end: 20px}ion-header[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{font-size:25px;font-weight:600;color:#1a1a1a;text-align:left;padding-left:18px}ion-header[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{--color: #666}ion-content[_ngcontent-%COMP%]{--background: white;--padding-start: 20px;--padding-end: 20px;--padding-top: 16px;--padding-bottom: 20px}.form-subtitle[_ngcontent-%COMP%]{font-size:12px;color:#666;margin:0 0 24px;line-height:1.5}.form-section[_ngcontent-%COMP%]{margin-bottom:24px}.form-section[_ngcontent-%COMP%] .section-label[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:#1a1a1a;margin:0 0 8px}.form-section[_ngcontent-%COMP%] .form-item[_ngcontent-%COMP%]{--background: #f5f5f5;--border-radius: 8px;--padding-start: 16px;--padding-end: 16px;--inner-padding-end: 0;margin-bottom:8px;border-radius:8px;border:1px solid #e0e0e0}.form-section[_ngcontent-%COMP%] .form-item[_ngcontent-%COMP%] ion-input[_ngcontent-%COMP%], .form-section[_ngcontent-%COMP%] .form-item[_ngcontent-%COMP%] ion-select[_ngcontent-%COMP%], .form-section[_ngcontent-%COMP%] .form-item[_ngcontent-%COMP%] ion-textarea[_ngcontent-%COMP%]{--placeholder-color: #999;--placeholder-opacity: 1;font-size:14px;color:#1a1a1a}.form-section[_ngcontent-%COMP%] .form-item[_ngcontent-%COMP%] ion-select[_ngcontent-%COMP%]{width:100%}.form-section[_ngcontent-%COMP%] .form-item.textarea-item[_ngcontent-%COMP%]{--padding-top: 12px;--padding-bottom: 12px}.form-section[_ngcontent-%COMP%] .form-item.textarea-item[_ngcontent-%COMP%] ion-textarea[_ngcontent-%COMP%]{min-height:100px}.form-section[_ngcontent-%COMP%] .form-item.disabled-item[_ngcontent-%COMP%]{opacity:.7}.form-section[_ngcontent-%COMP%] .form-item.disabled-item[_ngcontent-%COMP%] ion-label[_ngcontent-%COMP%]{font-size:14px;color:#1a1a1a}.image-upload[_ngcontent-%COMP%]{width:100%;height:180px;border-radius:8px;border:2px dashed #d0d0d0;background:#f9f9f9;display:flex;align-items:center;justify-content:center;overflow:hidden;cursor:pointer}.image-upload[_ngcontent-%COMP%] .image-preview[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.image-upload[_ngcontent-%COMP%] .image-placeholder[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:8px;color:#999}.image-upload[_ngcontent-%COMP%] .image-placeholder[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:36px}.image-upload[_ngcontent-%COMP%] .image-placeholder[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:13px}.remove-image-btn[_ngcontent-%COMP%]{margin-top:4px;font-size:12px;text-transform:none}.error-chip[_ngcontent-%COMP%]{background-color:#ffebee;color:#c62828;width:100%;justify-content:center;margin:16px 0;border-radius:8px}.error-chip[_ngcontent-%COMP%] ion-text[_ngcontent-%COMP%]{font-size:12px}.save-button[_ngcontent-%COMP%]{--border-radius: 8px;height:48px;font-size:16px;font-weight:600;margin-top:8px;text-transform:none}.save-button[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:20px}"]}),o})();const R=["fileInput"];function Q(o,r){if(1&o&&(e.TgZ(0,"ion-select-option",29),e._uU(1),e.qZA()),2&o){const t=r.$implicit;e.Q6J("value",r.index),e.xp6(1),e.hij(" ",t.title," ")}}function G(o,r){if(1&o&&e._UZ(0,"img",30),2&o){const t=e.oxw(2);e.Q6J("src",t.imageUri,e.LSH)}}
1function B(o,r){1&o&&(e.TgZ(0,"div",31),e._UZ(1,"ion-icon",32),e.TgZ(2,"span"),e._uU(3,"Tap to add photo"),e.qZA()())}function H(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"ion-button",33),e.NdJ("click",function(){e.CHM(t);const n=e.oxw(2);return e.KtG(n.removeImage())}),e._UZ(1,"ion-icon",34),e._uU(2," Remove Photo "),e.qZA()}}function j(o,r){if(1&o&&(e.TgZ(0,"ion-chip",35)(1,"ion-text")(2,"strong"),e._uU(3),e.qZA()()()),2&o){const t=e.oxw(2);e.xp6(3),e.Oqu(t.invalidMessage)}}function W(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"form",6)(1,"p",7),e._uU(2,"Complete the form below and click "),e.TgZ(3,"strong"),e._uU(4,"Save Product"),e.qZA(),e._uU(5," to add it to your Product Catalog."),e.qZA(),e.TgZ(6,"div",8)(7,"h3",9),e._uU(8,"Product"),e.qZA(),e.TgZ(9,"ion-item",10)(10,"ion-select",11),e.YNc(11,Q,2,2,"ion-select-option",12),e.qZA()()(),e.TgZ(12,"div",8)(13,"h3",9),e._uU(14,"Pricing (per load)"),e.qZA(),e.TgZ(15,"ion-item",10),e._UZ(16,"ion-input",13),e.qZA(),e.TgZ(17,"ion-item",10),e._UZ(18,"ion-input",14),e.qZA(),e.TgZ(19,"ion-item",10),e._UZ(20,"ion-input",15),e.qZA(),e.TgZ(21,"ion-item",10),e._UZ(22,"ion-input",16),e.qZA()(),e.TgZ(23,"div",8)(24,"h3",9),e._uU(25,"Pricing (per yd\xb3)"),e.qZA(),e.TgZ(26,"ion-item",10),e._UZ(27,"ion-input",17),e.qZA()(),e.TgZ(28,"div",8)(29,"h3",9),e._uU(30,"Description"),e.qZA(),e.TgZ(31,"ion-item",18),e._UZ(32,"ion-textarea",19),e.qZA()(),e.TgZ(33,"div",8)(34,"h3",9),e._uU(35,"Product Photo"),e.qZA(),e.TgZ(36,"div",20),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.selectImage())}),e.YNc(37,G,1,1,"img",21),e.YNc(38,B,4,0,"div",22),e.qZA(),e.TgZ(39,"input",23,24),e.NdJ("change",function(n){e.CHM(t);const a=e.oxw();return e.KtG(a.onFileSelected(n))}),e.qZA(),e.YNc(41,H,3,0,"ion-button",25),e.qZA(),e.YNc(42,j,4,1,"ion-chip",26),e.TgZ(43,"ion-button",27),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.addMaterial())}),e._UZ(44,"ion-icon",28),e._uU(45," Save Product "),e.qZA()()}if(2&o){const t=e.oxw();e.Q6J("formGroup",t.addItemForm),e.xp6(11),e.Q6J("ngForOf",t.availableGlobalItems),e.xp6(26),e.Q6J("ngIf",t.imageUri),e.xp6(1),e.Q6J("ngIf",!t.imageUri),e.xp6(3),e.Q6J("ngIf",t.imageUri),e.xp6(1),e.Q6J("ngIf",!t.addItemForm.valid),e.xp6(1),e.Q6J("disabled",!t.addItemForm.valid)}}let K=(()=>{class o{constructor(t,i,n,a){this.fb=t,this.modalController=i,this.platform=n,this.sanitizer=a,this.imageUri=null,this.imageBase64=null}ngOnInit(){}ionViewWillEnter(){this.addItemForm=this.fb.group({globalItem:[null,[s.kI.required,s.kI.min(0)]],priceDualAxel:[null,s.kI.required],priceTriAxel:[null,s.kI.required],priceTrailer:[null,s.kI.required],priceQuadAxel:[null,s.kI.required],cubicYardPrice:[null],description:[null]})}get invalidMessage(){let t="";for(const i in this.addItemForm.controls)if(this.addItemForm.get(i).invalid){t=i;break}switch(t){case"globalItem":return"Please select a material";case"priceDualAxel":return"Please enter pricing for a Dual Axle Truck";case"priceTriAxel":return"Please enter pricing for a Tri Axle Truck";case"priceTrailer":return"Please enter pricing for a Trailer";case"priceQuadAxel":return"Please enter pricing for a Quad Axle Truck";case"description":return"Please enter a description";default:return"Please fill in all the fields"}}dismissModal(){this.modalController.dismiss({},"dismissed")}selectImage(){var t=this;return(0,g.Z)(function*(){if(t.platform.is("capacitor"))try{const i=yield k.getPhoto({quality:80,allowEditing:!1,resultType:O.Uri,source:M.Prompt});t.imageUri=i.webPath;const a=yield(yield fetch(i.webPath)).blob();t.imageBase64=yield t.blobToBase64(a)}catch(i){console.log("Image selection cancelled or failed",i)}else t.fileInput.nativeElement.click()})()}onFileSelected(t){const i=t.target.files?.[0];i&&(this.imageUri=this.sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(i)),this.blobToBase64(i).then(n=>this.imageBase64=n))}removeImage(){this.imageUri=null,this.imageBase64=null}addMaterial(){const t={...this.addItemForm.value,imageBase64:this.imageBase64};this.modalController.dismiss(t,"confirmed")}blobToBase64(t){return new Promise((i,n)=>{const a=new FileReader;a.onloadend=()=>i(a.result.split(",")[1]),a.onerror=n,a.readAsDataURL(t)})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(s.qu),e.Y36(c.IN),e.Y36(c.t4),e.Y36(E.H7))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-add-catalog-item-modal"]],viewQuery:function(t,i){if(1&t&&e.Gf(R,5),2&t){let n;e.iGM(n=e.CRH())&&(i.fileInput=n.first)}},inputs:{availableGlobalItems:"availableGlobalItems"},decls:9,vars:1,consts:[[1,"ion-no-border"],[1,"modal-title"],["slot","end"],["fill","clear",3,"click"],["slot","icon-only","name","close"],[3,"formGroup",4,"ngIf"],[3,"formGroup"],[1,"form-subtitle"],[1,"form-section"],[1,"section-label"],["lines","none",1,"form-item"],["placeholder","Select Product","formControlName","globalItem","interface","popover"],[3,"value",4,"ngFor","ngForOf"],["type","number","placeholder","Dual Axle","formControlName","priceDualAxel"],["type","number","placeholder","Tri Axle","formControlName","priceTriAxel"],["type","number","placeholder","Quad Axle","formControlName","priceQuadAxel"],["type","number","placeholder","Trailer","formControlName","priceTrailer"],["type","number","placeholder","Cubic Yards","formControlName","cubicYardPrice"],["lines","none",1,"form-item","textarea-item"],["placeholder","Enter description","autoGrow","true","formControlName","description","rows","4"],[1,"image-upload",3,"click"],["alt","Product photo","class","image-preview",3,"src",4,"ngIf"],["class","image-placeholder",4,"ngIf"],["type","file","accept","image/*","hidden","",3,"change"],["fileInput",""],["fill","clear","size","small","color","danger","class","remove-image-btn",3,"click",4,"ngIf"],["class","error-chip",4,"ngIf"],["expand","block","color","success",1,"save-button",3,"disabled","click"],["slot","start","name","checkmark-circle"],[3,"value"],["alt","Product photo",1,"image-preview",3,"src"],[1,"image-placeholder"],["name","camera-outline"],["fill","clear","size","small","color","danger",1,"remove-image-btn",3,"click"],["slot","start","name","trash-outline"],[1,"error-chip"]],template:function(t,i){1&t&&(e.TgZ(0,"ion-header",0)(1,"ion-toolbar")(2,"ion-title",1),e._uU(3,"Add New Product"),e.qZA(),e.TgZ(4,"ion-buttons",2)(5,"ion-button",3),e.NdJ("click",function(){return i.dismissModal()}),e._UZ(6,"ion-icon",4),e.qZA()()()(),e.TgZ(7,"ion-content"),e.YNc(8,W,46,7,"form",5),e.qZA()),2&t&&(e.xp6(8),e.Q6J("ngIf",i.addItemForm))}
1,dependencies:[h.sg,h.O5,s._Y,s.JJ,s.JL,c.YG,c.Sm,c.hM,c.W2,c.Gu,c.gu,c.pK,c.Ie,c.t9,c.n0,c.yW,c.g2,c.wd,c.sr,c.as,c.QI,c.j9,s.sg,s.u],styles:["ion-header[_ngcontent-%COMP%]{padding-top:70px}ion-header[_ngcontent-%COMP%] ion-toolbar[_ngcontent-%COMP%]{--background: white;--border-width: 0;--padding-start: 18px;--padding-end: 20px}ion-header[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{font-size:25px;font-weight:600;color:#1a1a1a;text-align:left;padding-left:18px}ion-header[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{--color: #666}ion-content[_ngcontent-%COMP%]{--background: white;--padding-start: 20px;--padding-end: 20px;--padding-top: 16px;--padding-bottom: 20px}.form-subtitle[_ngcontent-%COMP%]{font-size:12px;color:#666;margin:0 0 24px;line-height:1.5}.form-section[_ngcontent-%COMP%]{margin-bottom:24px}.form-section[_ngcontent-%COMP%] .section-label[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:#1a1a1a;margin:0 0 8px}.form-section[_ngcontent-%COMP%] .form-item[_ngcontent-%COMP%]{--background: #f5f5f5;--border-radius: 8px;--padding-start: 16px;--padding-end: 16px;--inner-padding-end: 0;margin-bottom:8px;border-radius:8px;border:1px solid #e0e0e0}.form-section[_ngcontent-%COMP%] .form-item[_ngcontent-%COMP%] ion-input[_ngcontent-%COMP%], .form-section[_ngcontent-%COMP%] .form-item[_ngcontent-%COMP%] ion-select[_ngcontent-%COMP%], .form-section[_ngcontent-%COMP%] .form-item[_ngcontent-%COMP%] ion-textarea[_ngcontent-%COMP%]{--placeholder-color: #999;--placeholder-opacity: 1;font-size:14px;color:#1a1a1a}.form-section[_ngcontent-%COMP%] .form-item[_ngcontent-%COMP%] ion-select[_ngcontent-%COMP%]{width:100%}.form-section[_ngcontent-%COMP%] .form-item.textarea-item[_ngcontent-%COMP%]{--padding-top: 12px;--padding-bottom: 12px}.form-section[_ngcontent-%COMP%] .form-item.textarea-item[_ngcontent-%COMP%] ion-textarea[_ngcontent-%COMP%]{min-height:100px}.image-upload[_ngcontent-%COMP%]{width:100%;height:180px;border-radius:8px;border:2px dashed #d0d0d0;background:#f9f9f9;display:flex;align-items:center;justify-content:center;overflow:hidden;cursor:pointer}.image-upload[_ngcontent-%COMP%] .image-preview[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.image-upload[_ngcontent-%COMP%] .image-placeholder[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:8px;color:#999}.image-upload[_ngcontent-%COMP%] .image-placeholder[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:36px}.image-upload[_ngcontent-%COMP%] .image-placeholder[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:13px}.remove-image-btn[_ngcontent-%COMP%]{margin-top:4px;font-size:12px;text-transform:none}.error-chip[_ngcontent-%COMP%]{background-color:#ffebee;color:#c62828;width:100%;justify-content:center;margin:16px 0;border-radius:8px}.error-chip[_ngcontent-%COMP%] ion-text[_ngcontent-%COMP%]{font-size:12px}.save-button[_ngcontent-%COMP%]{--border-radius: 8px;height:48px;font-size:16px;font-weight:600;margin-top:8px;text-transform:none}.save-button[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:20px}"]}),o})();var L=m(4601),q=m(3030),$=m(6587),X=m(8267);function V(o,r){if(1&o&&(e.TgZ(0,"div",35),e._UZ(1,"img",36),e.qZA()),2&o){const t=e.oxw().$implicit;e.xp6(1),e.s9C("alt",t.materialTitle),e.Q6J("src",t.images[0],e.LSH)}}function ee(o,r){1&o&&e._UZ(0,"div",37)}function te(o,r){if(1&o&&(e.TgZ(0,"div",38)(1,"span",25),e._uU(2,"$/yd\xb3:"),e.qZA(),e.TgZ(3,"span",26),e._uU(4),e.qZA()()),2&o){const t=e.oxw().$implicit;e.xp6(4),e.hij("$",t.priceList.cubicYards,"")}}function ie(o,r){if(1&o&&(e.TgZ(0,"div",39)(1,"span",25),e._uU(2,"Description:"),e.qZA(),e.TgZ(3,"span",40),e._uU(4),e.qZA()()),2&o){const t=e.oxw().$implicit;e.xp6(4),e.Oqu(t.description)}}function ne(o,r){1&o&&e._UZ(0,"div",41)}function oe(o,r){if(1&o){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",14)(2,"div",15)(3,"div",16)(4,"div",17),e._UZ(5,"ion-icon",18),e.qZA(),e.TgZ(6,"h3",19),e._uU(7),e.qZA()(),e.YNc(8,V,2,2,"div",20),e.YNc(9,ee,1,0,"div",21),e.qZA(),e._UZ(10,"div",22),e.TgZ(11,"div",23)(12,"div",24)(13,"span",25),e._uU(14,"Dual:"),e.qZA(),e.TgZ(15,"span",26),e._uU(16),e.qZA()(),e.TgZ(17,"div",24)(18,"span",25),e._uU(19,"Quad:"),e.qZA(),e.TgZ(20,"span",26),e._uU(21),e.qZA()(),e.TgZ(22,"div",24)(23,"span",25),e._uU(24,"Tri:"),e.qZA(),e.TgZ(25,"span",26),e._uU(26),e.qZA()(),e.TgZ(27,"div",24)(28,"span",25),e._uU(29,"Trailer:"),e.qZA(),e.TgZ(30,"span",26),e._uU(31),e.qZA()()(),e.YNc(32,te,5,1,"div",27),e.YNc(33,ie,5,1,"div",28),e._UZ(34,"div",22),e.TgZ(35,"div",29)(36,"ion-button",30),e.NdJ("click",function(){const a=e.CHM(t).index,l=e.oxw();return e.KtG(l.openEditMaterialAlert(a))}),e._UZ(37,"ion-icon",31),e._uU(38," Edit "),e.qZA(),e.TgZ(39,"ion-button",32),e.NdJ("click",function(){const a=e.CHM(t).index,l=e.oxw();return e.KtG(l.confirmDeleteMaterial(a))}),e._UZ(40,"ion-icon",33),e._uU(41," Delete "),e.qZA()()(),e.YNc(42,ne,1,0,"div",34),e.BQk()}if(2&o){const t=r.$implicit,i=r.last,n=e.oxw();let a,l,p,d;e.xp6(7),e.Oqu(t.materialTitle),e.xp6(1),e.Q6J("ngIf",t.images&&t.images.length>0),e.xp6(1),e.Q6J("ngIf",!t.images||0===t.images.length),e.xp6(7),e.hij("$",null!==(a=null!==(a=null==t.priceList?null:t.priceList.dualAxel)&&void 0!==a?a:null==t.priceList?null:t.priceList.dualAxelPrice)&&void 0!==a?a:"-",""),e.xp6(5),e.hij("$",null!==(l=null!==(l=null==t.priceList?null:t.priceList.quadAxel)&&void 0!==l?l:null==t.priceList?null:t.priceList.quadAxelPrice)&&void 0!==l?l:"-",""),e.xp6(5),e.hij("$",null!==(p=null!==(p=null==t.priceList?null:t.priceList.triAxel)&&void 0!==p?p:null==t.priceList?null:t.priceList.triAxelPrice)&&void 0!==p?p:"-",""),e.xp6(5),e.hij("$",null!==(d=null!==(d=null==t.priceList?null:t.priceList.trailer)&&void 0!==d?d:null==t.priceList?null:t.priceList.trailerPrice)&&void 0!==d?d:"-",""),e.xp6(1),e.Q6J("ngIf",null!=(null==t.priceList?null:t.priceList.cubicYards)),e.xp6(1),e.Q6J("ngIf",t.description),e.xp6(3),e.Q6J("disabled",!n.allowClick),e.xp6(3),e.Q6J("disabled",!n.allowClick),e.xp6(3),e.Q6J("ngIf",!i)}}
1function ae(o,r){1&o&&(e.TgZ(0,"div",42),e._UZ(1,"ion-icon",18),e.TgZ(2,"p"),e._uU(3,"No products in your catalog yet."),e.qZA()())}const re=[{path:"",component:(()=>{class o{constructor(t,i,n,a,l){this.materialService=t,this.catalogService=i,this.sharedService=n,this.modalController=a,this.alertController=l,this.minecartLoadedIcon=A.H}ngOnInit(){this.allowClick=!1}ionViewWillEnter(){this.destroySubs=new T.x,this.sharedService.currentEntity$.pipe((0,f.R)(this.destroySubs),(0,P.w)(t=>{let i=this.curEntityDoc?this.curEntityDoc.docId:null;return this.curEntityDoc=t,(0,_.of)(t?{isSuccessful:!0,newDocId:this.curEntityDoc.docId,oldDocId:i}:{isSuccessful:!1,newDocId:null,oldDocId:null})}),(0,y.h)(t=>t.isSuccessful&&t.newDocId!=t.oldDocId)).subscribe({next:t=>{t.isSuccessful&&this.loadResources()}})}retrieveMaterialListAndCatalog(){var t=this;return(0,g.Z)(function*(){t.pitCatalog=(yield t.catalogService.getEntityMaterialCatalog(t.curEntityDoc.docId)).docs.map(n=>n.data());let i=t.pitCatalog.map(n=>n.materialGlobalDocId);return t.availableGlobalItems=yield t.materialService.getAvailableMaterials(i),!0})()}loadResources(){var t=this;return(0,g.Z)(function*(){if(t.allowClick=!1,yield t.sharedService.displayLoadingElement(),!t.curEntityDoc)return t.allowClick=!0,void(yield t.sharedService.dismissLoadingElement());yield t.retrieveMaterialListAndCatalog(),t.allowClick=!0,yield t.sharedService.dismissLoadingElement()})()}refreshPage(t){var i=this;return(0,g.Z)(function*(){!i.allowClick||(yield i.loadResources(),t.target.complete())})()}addMaterialToCatalog(t){var i=this;return(0,g.Z)(function*(){if(!i.allowClick||!i.curEntityDoc)return;i.allowClick=!1,yield i.sharedService.displayLoadingElement();let n=i.availableGlobalItems[t.globalItem],a={isAvailable:!0,description:t.description?t.description:n.description,materialGlobalDocId:n.docId,materialTitle:n.title,priceList:{dualAxel:t.priceDualAxel,triAxel:t.priceTriAxel,trailer:t.priceTrailer,quadAxel:t.priceQuadAxel,cubicYards:t.cubicYardPrice},imageBase64:t.imageBase64||null},l={pitDocId:i.curEntityDoc.docId,pitId:i.curEntityDoc.docId,pitTitle:i.curEntityDoc.pitTitle?i.curEntityDoc.pitTitle:i.curEntityDoc.title,inStock:!0,pitLat:i.curEntityDoc.geoLocation.latitude,pitLong:i.curEntityDoc.geoLocation.longitude,pitLongAddress:i.curEntityDoc.longAddress,pitMaterialDescription:a.description,priceList:{dualAxel:t.priceDualAxel,triAxel:t.priceTriAxel,trailer:t.priceTrailer,quadAxel:t.priceQuadAxel,cubicYards:t.cubicYardPrice},pitMaterialAvailable:!0,pitServiceType:i.curEntityDoc.providedServiceType};var p;i.catalogService.addMaterialToCatalog({pitId:i.curEntityDoc.docId,globalItemDocId:n.docId,catalogItem:JSON.stringify(a),supplierData:JSON.stringify(l)}).pipe((0,b.q)(1)).subscribe({next:(p=(0,g.Z)(function*(d){yield i.retrieveMaterialListAndCatalog(),yield i.sharedService.dismissLoadingElement(),i.allowClick=!0,yield i.sharedService.showToastr({color:"success",message:"Material added to your catalog.",duration:1500})}),function(u){return p.apply(this,arguments)}),error:function(){var p=(0,g.Z)(function*(d){yield i.retrieveMaterialListAndCatalog(),i.sharedService.dismissLoadingElement(),i.allowClick=!0,i.sharedService.showToastr({color:"danger",message:"Something Went Wrong Please Try Again.",duration:1500})});return function(u){return p.apply(this,arguments)}}()})})()}openAddMaterialModal(){var t=this;return(0,g.Z)(function*(){if(!t.allowClick)return;t.allowClick=!1;let i=yield t.modalController.create({component:K,componentProps:{availableGlobalItems:t.availableGlobalItems}});yield i.present();const{data:n,role:a}=yield i.onDidDismiss();console.log("Add data: ",n),console.log("Add Role: ",a),"confirmed"==a?(t.allowClick=!0,yield t.addMaterialToCatalog(n)):t.allowClick=!0})()}openEditMaterialAlert(t){var i=this;return(0,g.Z)(function*(){if(!i.allowClick)return;i.allowClick=!1;let n=i.pitCatalog[t],a=yield i.modalController.create({component:z,componentProps:{catItem:n}});yield a.present();const{data:l,role:p}=yield a.onDidDismiss();if(console.log("Edit data: ",l),console.log("Edit Role: ",p),"confirmed"==p){yield i.sharedService.displayLoadingElement();let d={pitId:i.curEntityDoc.docId,catalogItemId:n.docId,dualAxelPrice:l.dualAxelPrice,triAxelPrice:l.triAxelPrice,trailerPrice:l.trailerPrice,quadAxelPrice:l.quadAxelPrice,cubicYardPrice:l.cubicYardPrice};l.description&&(d.description=l.description),l.imageBase64&&(d.imageBase64=l.imageBase64),l.removeImage&&(d.removeImage=!0),i.catalogService.editCatalogItem(d).pipe((0,b.q)(1)).subscribe({next:(u=(0,g.Z)(function*(C){console.log("next: ",C),yield i.sharedService.showToastr({color:"success",duration:2e3,message:C.message}),yield i.retrieveMaterialListAndCatalog(),i.allowClick=!0,yield i.sharedService.dismissLoadingElement()}),function(pe){return u.apply(this,arguments)}),error:function(){var u=(0,g.Z)(function*(C){console.log("err: ",C),yield i.sharedService.showToastr({color:"danger",duration:2e3,message:C.message?C.message:"Something went wrong. Please Contact Support"}),i.allowClick=!0,yield i.sharedService.dismissLoadingElement()});return function(pe){return u.apply(this,arguments)}}()})}else i.allowClick=!0;var u})()}confirmDeleteMaterial(t){var i=this;return(0,g.Z)(function*(){if(!i.allowClick)return;const n=i.pitCatalog[t];yield(yield i.alertController.create({header:"Delete Material",message:`Are you sure you want to remove "${n.materialTitle}" from your catalog?`,buttons:[{text:"Cancel",role:"cancel"},{text:"Delete",role:"destructive",handler:()=>{i.deleteMaterial(n)}}]})).present()})()}deleteMaterial(t){var i=this;return(0,g.Z)(function*(){var n;i.allowClick=!1,yield i.sharedService.displayLoadingElement(),i.catalogService.deleteCatalogItem({pitId:i.curEntityDoc.docId,catalogItemId:t.docId}).pipe((0,b.q)(1)).subscribe({next:(n=(0,g.Z)(function*(){yield i.retrieveMaterialListAndCatalog(),yield i.sharedService.dismissLoadingElement(),i.allowClick=!0,yield i.sharedService.showToastr({color:"success",message:"Material removed from your catalog.",duration:1500})}),function(){return n.apply(this,arguments)}),error:function(){var n=(0,g.Z)(function*(){yield i.sharedService.dismissLoadingElement(),i.allowClick=!0,yield i.sharedService.showToastr({color:"danger",message:"Something went wrong. Please try again.",duration:1500})});return function(){return n.apply(this,arguments)}}()})})()}ionViewWillLeave(){this.destroySubs.next(!0),this.destroySubs.complete()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(L.U),e.Y36(q.P),e.Y36($.V),e.Y36(c.IN),e.Y36(c.Br))}
1,o.\u0275cmp=e.Xpm({type:o,selectors:[["app-pit-material-catalog"]],decls:19,vars:6,consts:[[3,"pageTitle"],["fullscreen","true"],["slot","fixed","pullFactor","0.5","pullMin","100","pullMax","200",3,"disabled","ionRefresh"],[1,"page-wrapper"],[1,"catalog-container"],[1,"catalog-title-bar"],[1,"catalog-title"],["color","success","size","small",1,"add-btn-inline",3,"disabled","click"],["slot","start","name","add-circle-outline"],[1,"catalog-content"],[4,"ngFor","ngForOf"],["class","empty-state",4,"ngIf"],[1,"add-btn-mobile"],["expand","block","color","success","size","large",3,"disabled","click"],[1,"material-card"],[1,"material-header"],[1,"material-header-left"],[1,"material-image"],["name","cube-outline"],[1,"material-title"],["class","material-photo",4,"ngIf"],["class","material-photo placeholder",4,"ngIf"],[1,"card-divider"],[1,"pricing-grid"],[1,"price-row"],[1,"price-label"],[1,"price-value"],["class","price-row volume-row",4,"ngIf"],["class","description-row",4,"ngIf"],[1,"action-buttons"],["fill","outline","size","small",3,"disabled","click"],["slot","start","name","create-outline"],["color","danger","size","small",3,"disabled","click"],["slot","start","name","trash-outline"],["class","material-divider",4,"ngIf"],[1,"material-photo"],[3,"src","alt"],[1,"material-photo","placeholder"],[1,"price-row","volume-row"],[1,"description-row"],[1,"description-value"],[1,"material-divider"],[1,"empty-state"]],template:function(t,i){1&t&&(e._UZ(0,"app-common-header",0),e.TgZ(1,"ion-content",1)(2,"ion-refresher",2),e.NdJ("ionRefresh",function(a){return i.refreshPage(a)}),e._UZ(3,"ion-refresher-content"),e.qZA(),e.TgZ(4,"div",3)(5,"div",4)(6,"div",5)(7,"h2",6),e._uU(8,"Product Catalog"),e.qZA(),e.TgZ(9,"ion-button",7),e.NdJ("click",function(){return i.openAddMaterialModal()}),e._UZ(10,"ion-icon",8),e._uU(11," Add Material "),e.qZA()(),e.TgZ(12,"div",9),e.YNc(13,oe,43,12,"ng-container",10),e.YNc(14,ae,4,0,"div",11),e.qZA()(),e.TgZ(15,"div",12)(16,"ion-button",13),e.NdJ("click",function(){return i.openAddMaterialModal()}),e._UZ(17,"ion-icon",8),e._uU(18," Add New Material "),e.qZA()()()()),2&t&&(e.Q6J("pageTitle","Pit"),e.xp6(2),e.Q6J("disabled",!i.allowClick),e.xp6(7),e.Q6J("disabled",!i.allowClick),e.xp6(4),e.Q6J("ngForOf",i.pitCatalog),e.xp6(1),e.Q6J("ngIf",i.pitCatalog&&0===i.pitCatalog.length),e.xp6(2),e.Q6J("disabled",!i.allowClick))},dependencies:[h.sg,h.O5,c.YG,c.W2,c.gu,c.nJ,c.Wo,X.M],styles:[".page-wrapper[_ngcontent-%COMP%]{max-width:1200px;margin:0 auto}.catalog-container[_ngcontent-%COMP%]{background:#fff;border:1px solid #e0e0e0;border-radius:12px;margin:16px;overflow:hidden}.catalog-title-bar[_ngcontent-%COMP%]{background:#f0f0f0;padding:16px 20px;display:flex;align-items:center;justify-content:space-between}.catalog-title[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:#1a1a1a;margin:0}.add-btn-inline[_ngcontent-%COMP%]{display:none;--border-radius: 8px;text-transform:none;font-weight:500}.catalog-content[_ngcontent-%COMP%]{padding:8px 20px 20px}.material-card[_ngcontent-%COMP%]{padding:0 0 4px}.material-header[_ngcontent-%COMP%]{display:flex;gap:12px}.card-divider[_ngcontent-%COMP%]{height:1px;background:#e0e0e0;margin:12px -20px}.material-header-left[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;justify-content:center}.material-image[_ngcontent-%COMP%]{width:48px;height:48px;display:flex;align-items:center;justify-content:center;margin-bottom:4px}.material-image[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:28px;color:#292d32}.material-title[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:#1a1a1a;margin:0}.material-photo[_ngcontent-%COMP%]{flex:1;border-radius:0;overflow:hidden;background:#f0f0f0;min-height:80px;margin:-12px -20px -12px 0}.material-photo[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block}.pricing-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:4px 24px;margin-bottom:4px}.price-row[_ngcontent-%COMP%]{display:flex;align-items:baseline}.price-row[_ngcontent-%COMP%] .price-label[_ngcontent-%COMP%]{min-width:70px}.price-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#666}.price-value[_ngcontent-%COMP%]{font-size:12px;
1color:#1a1a1a}.volume-row[_ngcontent-%COMP%]{margin-bottom:4px}.description-row[_ngcontent-%COMP%]{display:flex;margin-bottom:4px}.description-row[_ngcontent-%COMP%] .price-label[_ngcontent-%COMP%]{min-width:90px}.description-row[_ngcontent-%COMP%] .description-value[_ngcontent-%COMP%]{font-size:12px;color:#1a1a1a}.action-buttons[_ngcontent-%COMP%]{display:flex;gap:12px}.action-buttons[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{--border-radius: 8px;height:36px;font-size:13px;font-weight:500;text-transform:none;flex:1}.action-buttons[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:16px}.material-divider[_ngcontent-%COMP%]{height:1px;background:#e0e0e0;margin:12px -20px}.add-btn-mobile[_ngcontent-%COMP%]{padding:0 16px 16px}.empty-state[_ngcontent-%COMP%]{text-align:center;padding:32px 0}.empty-state[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:48px;color:#ccc}.empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#999;font-size:14px;margin-top:8px}@media (min-width: 768px){.catalog-container[_ngcontent-%COMP%]{margin:24px;border:none;border-radius:0;background:transparent;overflow:visible}.catalog-title-bar[_ngcontent-%COMP%]{border-radius:12px 12px 0 0}.catalog-title[_ngcontent-%COMP%]{font-size:18px}.add-btn-inline[_ngcontent-%COMP%]{display:inline-flex}.add-btn-mobile[_ngcontent-%COMP%]{display:none}.catalog-content[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;background:#f8f8f8;border-radius:0 0 12px 12px;padding:20px}.material-card[_ngcontent-%COMP%]{padding:16px;background:#fff;border:1px solid #e0e0e0;border-radius:10px;display:flex;flex-direction:column;transition:box-shadow .2s ease}.material-card[_ngcontent-%COMP%]:hover{box-shadow:0 2px 12px #00000014}.material-photo[_ngcontent-%COMP%]{margin:-16px -16px -12px 0;border-radius:0 10px 0 0}.card-divider[_ngcontent-%COMP%]{margin:12px -16px}.material-divider[_ngcontent-%COMP%]{display:none}.action-buttons[_ngcontent-%COMP%]{margin-top:auto;padding-top:0}.price-label[_ngcontent-%COMP%], .price-value[_ngcontent-%COMP%], .description-row[_ngcontent-%COMP%] .description-value[_ngcontent-%COMP%]{font-size:13px}}@media (min-width: 1100px){.catalog-content[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}"]}),o})()}];let le=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)}
1,o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[I.Bz.forChild(re),I.Bz]}),o})();var ce=m(7468),se=m(8400);let de=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({providers:[L.U,q.P,se.T],imports:[h.ez,s.u5,c.Pc,le,ce.I,s.u5,s.UX]}),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.