PageSourceSearch

https://www.c3controls.com/_nuxt/tyEK1Yva.js

js c3controls.com collected 2026-09-25 04:09:21 UTC 7,045 bytes, 2 lines download raw bytes

1import{cA as se,c1 as te,c3 as ne,dc as b,bc as D,c8 as ae,b9 as le,e2 as oe,c0 as ie,bp as Y,be as X,b2 as k,b6 as o,b5 as n,bb as g,bF as G,b3 as f,bX as re,b1 as S,b$ as H,cc as J,b4 as Z,bY as ue,b7 as ee,br as ce,c5 as de}from"#entry";import{d as fe,f as pe,c as me}from"./CiCGYa7m.js";import{_ as ve}from"./CVPUM6fI.js";(function(){try{var d=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};d.SENTRY_RELEASE={id:"72eedeac55beff79793aac14df0684aace638f90"}}catch{}})();try{(function(){var d=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},h=new d.Error().stack;h&&(d._sentryDebugIds=d._sentryDebugIds||{},d._sentryDebugIds[h]="bb2291d3-877d-4562-a034-98e707a64989",d._sentryDebugIdIdentifier="sentry-dbid-bb2291d3-877d-4562-a034-98e707a64989")})()}catch{}function ge(){const d=se(),{fetchProducts:h,cartProducts:w,clearCart:T,addToCart:Q,addQuantitiesOfExistingCartItems:z}=te(),q=ne(),x=b("formType",()=>1),c=b("openModal",()=>!1),m=b("activeTab",()=>"0"),y=b("loading",()=>!1),j=b("pnsWithIncorrectProdQty",()=>[]),C=b("lineByLine",()=>({rows:Array.from({length:5},()=>({pn:void 0,qty:void 0}))})),P=b("copyPaste",()=>""),p=b("availableQuickOrderItems",()=>[]),U=b("unAvailableItems",()=>[]);function $(e,s){const t=e%s;return t!==0?e-t+s:e}function A(e){return Object.values(e.reduce((t,a)=>{const v=a.pn.trim().toUpperCase();return t[v]?t[v].qty+=a.qty:t[v]={pn:v,qty:a.qty},t},{}))}function K(){C.value.rows.push({pn:void 0,qty:void 0})}function V(){C.value.rows=Array.from({length:5},()=>({pn:void 0,qty:void 0}))}function E(){P.value=""}const L=D(()=>x.value===1?C.value.rows.filter(e=>e.pn&&e.qty).map(e=>`${e.pn.trim().toUpperCase()},${e.qty}`):P.value.toUpperCase().split(`
2`).filter(Boolean)),W=D(()=>C.value.rows.filter(e=>e.pn&&e.qty).length),u=D(()=>W.value>0);async function i(e){const s=await h(e);p.value=s,w.value.length>0&&(c.value=!0,m.value="0")}function _(e){const s=e.filter(t=>!p.value.find(a=>a.pn===t));U.value=s,c.value=!0,m.value="0"}function I(e){const s=p.value,t=new Map(e.map(l=>[l.pn,l.qty])),a=s.filter(l=>t.has(l.pn)).filter(l=>{const R=t.get(l.pn),F=$(R,l.pkgqty);return R!==F}).map(l=>l.pn);return{adjustedList:s.filter(l=>t.has(l.pn)).map(l=>{const R=t.get(l.pn),F=$(R,l.pkgqty);return{...l,prod_quantity:F}}),bumped:a}}function O(e){e.length?(j.value=e,m.value="2",c.value=!0):(c.value=!1,console.log(q.query),ae(q.query.savedCartKey?`${d("/cart")}?savedCartKey=${q.query.savedCartKey}`:d("/cart")))}function B(e){const{adjustedList:s,bumped:t}=I(e);s.forEach(a=>{w.value.find(l=>l.pn===a.pn)?z(a,a.prod_quantity):Q(a)}),O(t)}function M(e){const{adjustedList:s,bumped:t}=I(e);T(),s.forEach(a=>Q(a)),O(t)}async function r(){y.value=!0;const e=L.value.map(a=>{const[v,l]=a.split(",");return{pn:v,qty:Number(l)}}),t=A(e).map(a=>a.pn);if(await i(t),p.value.length!==t.length){_(t),y.value=!1;return}if(w.value.length===0){N(!0),y.value=!1;return}m.value="1",y.value=!1}function N(e){const s=A(L.value.map(t=>{const[a,v]=t.split(",");return{pn:a,qty:Number(v)}}));console.log(s),e?M(s):B(s),V(),E(),x.value=1}return{formType:x,openModal:c,activeTab:m,loading:y,pnsWithIncorrectProdQty:j,lineByLine:C,copyPaste:P,availableQuickOrderItems:p,unAvailableItems:U,canAdd:u,filledCount:W,lineValues:L,addLineRow:K,resetLineByLine:V,resetCopyPaste:E,fetchQuickOrderItems:i,setUnavailableItems:_,appendItems:B,replaceItems:M,onSubmit:r,handleProceed:N}}const be={class:"text-lg font-bold"},ye={class:"text-md"},_e={class:"text-lg font-bold"},he={class:"subtitle-1 ml-2"},Ce={class:"text-lg font-bold"},Ie={class:"list-disc ml-4"},ke=le({__name:"QuickOrderPadModal",emits:["reset"],setup(d,{emit:h}){const{width:w}=oe(),{cartProducts:T}=te(),{localize:Q}=ie(),{pnsWithIncorrectProdQty:z,unAvailableItems:q,availableQuickOrderItems:x,openModal:c,activeTab:m,handleProceed:y}=ge(),{getLocalePath:j}=fe(),C=ne(),P=h,p=Y("clear"),U=Y([{slot:"unavailableItems",label:"Unavailable Items",disabled:!0},{slot:"updateCart",label:"Update Cart",disabled:!0},{slot:"adjustedQty",label:"Cart Qty Adjusted",disabled:!0}]),$=Y([{label:"clearAndReplaceItems",value:"clear"},{label:"addItemsToExistingCart",value:"append",description:`(${Q("handlingSimilarProductsNote",null)})`}]),A=D(()=>w.value>=768);function K(){T.value.length===0?y(p.value==="clear"):m.value="1"}function V(){c.value=!1,P("reset")}function E(){c.value=!1,ae(`${j("cart")}?savedCartKey=${C.query.savedCartKey}`)}function L(){c.value=!1,y(p.value==="clear")}return(W,u)=>{const i=re,_=ue,I=me,O=ve,B=pe,M=de;return k(),X(M,{dismissible:!1,"prevent-close":"",close:!1,fullscreen:!g(A),class:"w-full sm:w-1/3",open:g(c),"onUpdate:open":u[3]||(u[3]=r=>G(c)?c.value=r:null),ui:{footer:"justify-end",content:"w-2/5",overlay:"fixed inset-0 backdrop-blur-sm bg-white/30"}}
2,{content:o(()=>[n(B,{modelValue:g(m),"onUpdate:modelValue":u[2]||(u[2]=r=>G(m)?m.value=r:null),items:g(U),ui:{list:"hidden"}},{unavailableItems:o(()=>[n(I,{ui:{footer:"flex justify-end space-x-2"}},{header:o(()=>[f("p",be,[n(i,{tstring:{string:"unavailableItems"}})])]),footer:o(()=>[g(x).length>0?(k(),X(_,{key:0,color:"primary",variant:"ghost",onClick:K},{default:o(()=>[n(i,{tstring:{string:"proceedWithAvailableItems"}})]),_:1})):ce("",!0),n(_,{color:"error",variant:"ghost",onClick:V},{default:o(()=>[n(i,{tstring:{string:"cancel"}})]),_:1})]),default:o(()=>[f("div",null,[f("p",ye,[n(i,{tstring:{string:"incorrectUnavailablePartNo"}})]),f("ul",null,[(k(!0),S(H,null,J(g(q),(r,N)=>(k(),S("li",{key:N},Z(r),1))),128))])])]),_:1})]),updateCart:o(()=>[n(I,{ui:{footer:"flex justify-end space-x-2"}},{header:o(()=>[f("p",_e,[n(i,{tstring:{string:"updateCart"}}),f("i",he,[u[4]||(u[4]=ee(" (",-1)),n(i,{tstring:{string:"itemsAlreadyExists",variables:[{var:g(T).length}]}},null,8,["tstring"]),u[5]||(u[5]=ee(".) ",-1))])])]),footer:o(()=>[n(_,{color:"primary",variant:"ghost",onClick:L},{default:o(()=>[n(i,{tstring:{string:"done"}})]),_:1}),n(_,{color:"error",variant:"ghost",onClick:u[1]||(u[1]=r=>c.value=!1)},{default:o(()=>[n(i,{tstring:{string:"cancel"}})]),_:1})]),default:o(()=>[f("div",null,[n(O,{modelValue:g(p),"onUpdate:modelValue":u[0]||(u[0]=r=>G(p)?p.value=r:null),color:"primary",items:g($),size:"xl",ui:{item:"space-y-2",description:"italic text-sm"}},{label:o(({item:r})=>[n(i,{tstring:{string:r.label}},null,8,["tstring"])]),_:1},8,["modelValue","items"])])]),_:1})]),adjustedQty:o(()=>[n(I,{ui:{footer:"flex justify-end"}},{header:o(()=>[f("p",Ce,[n(i,{tstring:{string:"adjustForPkgQtyTitle"}})])]),footer:o(()=>[n(_,{color:"primary",variant:"ghost",onClick:E},{default:o(()=>[n(i,{tstring:{string:"close"}})]),_:1})]),default:o(()=>[f("div",null,[f("p",null,[n(i,{tstring:{string:"adjustForPkgQtyMessage"}})]),f("ul",Ie,[(k(!0),S(H,null,J(g(z),r=>(k(),S("li",{key:r},[f("strong",null,Z(r),1)]))),128))])])]),_:1})]),_:1},8,["modelValue","items"])]),_:1},8,["fullscreen","open"])}}}),Pe=Object.assign(ke,{__name:"QuickOrderPadModal"});export{Pe as _,ge as u};

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.