PageSourceSearch

https://www.bannerbuzz.com/_next/static/chunks/17171.20261003.2f34d15a1a4d5a81.js

js bannerbuzz.com collected 2026-10-03 19:16:39 UTC 56,527 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[17171],{17171:function(t,e,i){i.r(e),i.d(e,{default:function(){return th}});var o=i(85893),a=i(1864),s=i.n(a),n=i(67294),d=i(45697),l=i.n(d),r=i(2664),p=i(11752),u=i.n(p),c=i(22031),h=i(19601),v=i(3431),g=i(32374),m=i(73935),P=i(94184),_=i.n(P),D=i(14890),w=i(69441),O=i(68652),y=i(84144),b=i(66261),f=i(21438),S=i(7107),k=i(57014),T=i(47394),x=i(45248),C=i(47037),I=i(42829),A=i(15261),N=i(33804),j=i(70075),z=i(78817),R=i(4925),B=i(76437),q=i(58495),U=i(17185),F=i(34171),H=i(7754),L=i(82870),M=i(72091),G=i(66741),Z=i(84169),E=i(44292),Q=i(18863),K=i(54595),W=i(53493),V=i(24743),Y=i(62266),$=i(94389),X=i(91138),J=i(27192),tt=i(55473),te=i(12643),ti=i(22018),to=i(83399);let{publicRuntimeConfig:ta}=u()(),ts="";class tn extends n.Component{async componentDidMount(){var t,e,i,o,a,s;let{reviewOptions:n}=this.props;if(this.initiateOptionState(n),this.setState({mode:(0,U.z_)()}),window.addEventListener("resize",this.onResize),window.addEventListener("scroll",this.onScroll),((null===(t=this.props.productData)||void 0===t?void 0:t.child_products)&&(null===(i=this.props)||void 0===i?void 0:null===(e=i.productData)||void 0===e?void 0:e.child_products.length)>0||(null===(o=this.props.productData)||void 0===o?void 0:o.package_child_options)&&(null===(s=this.props)||void 0===s?void 0:null===(a=s.productData)||void 0===a?void 0:a.package_child_options.length)>0)&&(this.handleFetchChildPkgProducts(),this.setState(t=>({...t,isDisplayPackageProduct:!0}))),ts=window.requestAnimationFrame?window.requestAnimationFrame.bind(window):t=>setTimeout(t,16),this.props.isAbUrl){let t=(0,f.createHeader)(this.props.storedata),e=await this.props.actions.getArtworkTwoSideOptionList(t);this.setState({twoSidedOptionsList:(null==e?void 0:e.data)||[]})}}componentWillUnmount(){window.removeEventListener("resize",this.onResize),window.removeEventListener("scroll",this.onScroll)}async handleFetchChildPkgProducts(){var t,e,i,o,a,s,n,d;let l={isNewPDP:this.props.isNewPDPOptionPage||this.props.isNewReviewOptionPage?1:0};!1==this.props.isLogin?l.price=(null===(s=this.props.productData)||void 0===s?void 0:s.price)&&(null===(n=this.props.productData)||void 0===n?void 0:n.price[0])&&(null===(d=this.props.productData)||void 0===d?void 0:d.price[0].product_base_price)||0:l.price=this.state.initialPrice||0;let r=(0,f.createHeader)(this.props.storedata),p=null===(e=this.props.productData)||void 0===e?void 0:null===(t=e.package_child_options)||void 0===t?void 0:t.filter((t,e,i)=>i.findIndex(i=>{var o,a;return(null==i?void 0:null===(o=i.graphicsOption)||void 0===o?void 0:o.sku)===(null==t?void 0:null===(a=t.graphicsOption)||void 0===a?void 0:a.sku)===e})).map(t=>{var e;let i=null===(e=this.props.productData)||void 0===e?void 0:e.child_products.find(e=>{var i,o,a,s;return(null==t?void 0:t.hasGraphicsOption)?null==t?void 0:null===(o=t.graphicsOption)||void 0===o?void 0:null===(i=o.sku)||void 0===i?void 0:i.includes(e.sku):(null==t?void 0:t.hasHardwareOption)?null==t?void 0:null===(s=t.hardwareOption)||void 0===s?void 0:null===(a=s.sku)||void 0===a?void 0:a.includes(e.sku):void 0});return{...t,...i}}),u=(null===(i=this.props)||void 0===i?void 0:i.eventType)==4?p||[]:(null===(a=this.props)||void 0===a?void 0:null===(o=a.productData)||void 0===o?void 0:o.child_products)||[],c=async(t,e,i)=>{var o,a,s,n,d;let p={isDesignOnline:this.state.isDesignOnline,cdtSizeData:this.state.cdtSizeData,isNewPDPOptionPage:null===(o=this.state)||void 0===o?void 0:o.isNewPDPOptionPage,isNewReviewOptionPage:null===(a=this.state)||void 0===a?void 0:a.isNewReviewOptionPage};try{let o=await (0,S.SD)({...l,sku:e},r).then(e=>{let o=null==e?void 0:e.data;return o=e.data,{id:i,options:{...o,...t}}}),a=(null==o?void 0:null===(s=o.options)||void 0===s?void 0:s.option)||{},u=null==a?void 0:a.hasHardwareOption,c=null==a?void 0:null===(n=a.hardwareOption)||void 0===n?void 0:n.options,h=null==a?void 0:a.hasGraphicsOption,v=null==a?void 0:null===(d=a.graphicsOption)||void 0===d?void 0:d.options;if("graphicsOption"in a||"hardwareOption"in a){let t=u&&!c,e=h&&!v;t&&void 0===h||e&&void 0===u||t&&e?o.showCustomizeLink=!1:o.showCustomizeLink=!0}let g=await (0,S.CJ)({...l,sku:e},r).then(e=>({id:i,sizes:{...null==e?void 0:e.data,...t}})),m=(0,x.OL)({...o.options,...null==g?void 0:g.sizes,...p}),P=await this.props.actions.getProductPrice(m,r).then(e=>({id:i,optionsPrice:{...null==e?void 0:e.data,...t}}));return{...o,...g,...P}}catch(t){return console.log("package=>child product fetching error",t),console.error("package=>child product fetching error",t)}};Promise.all(u.map((t,e)=>c(t,null==t?void 0:t.sku,e+1))).then(async t=>{var e;t.length>0&&await this.loadPrice();let i=t.filter(Boolean).map((t,e)=>({...t,id:e+1}
1)),o=[];4==this.props.eventType&&(o=i.map(t=>{let e=u.find(e=>{var i;return e.sku===(null==t?void 0:null===(i=t.options)||void 0===i?void 0:i.sku)});if(e){var i,o,a,s,n,d,l;return{...t,options:{...null==t?void 0:t.options,option:{...null==t?void 0:null===(i=t.options)||void 0===i?void 0:i.option,graphicsOption:null!==(d=null==e?void 0:e.graphicsOption)&&void 0!==d?d:null==t?void 0:null===(a=t.options)||void 0===a?void 0:null===(o=a.option)||void 0===o?void 0:o.graphicsOption,hardwareOption:null!==(l=null==e?void 0:e.hardwareOption)&&void 0!==l?l:null==t?void 0:null===(n=t.options)||void 0===n?void 0:null===(s=n.option)||void 0===s?void 0:s.hardwareOption}}}}return t}));let a=2==this.props.eventType?o:i;(null===(e=this.props)||void 0===e?void 0:e.eventType)==4?this.setState(t=>{var e,i,o,s;return{childPkgProductData:[...Array.isArray(t.childPkgProductData)?t.childPkgProductData:[],...a],quantity:{...t.quantity,default_value:null===(s=this.props)||void 0===s?void 0:null===(o=s.productData)||void 0===o?void 0:null===(i=o.child_products)||void 0===i?void 0:null===(e=i[0])||void 0===e?void 0:e.parent_product_qty}}}):this.setState(t=>({childPkgProductData:[...Array.isArray(t.childPkgProductData)?t.childPkgProductData:[],...a]}))}).catch(t=>{console.error("Error fetching child product data:",t)})}getButtonStatus(){let{option:t,isOptionLoaded:e,responseMessage:i}=this.state;return!i&&(!0!=e||!0!=t.hasGraphicsOption||!0!=t.hasHardwareOption||!!((0,y.Z)(t.graphicsOption.selection.child_options,{selected:!0,display_options:!0})||(0,y.Z)(t.hardwareOption.selection.child_options,{selected:!0,display_options:!0})))}scrollTop(){if(document&&window){let t=(document.getElementById("errorScrollHere")&&document.getElementById("errorScrollHere").getBoundingClientRect()).top+window.pageYOffset;b.default.animateScroll.scrollTo(t)}}setShowDiv(t){this.state.showBorderTop!==t&&this.setState({showBorderTop:t})}render(){let{is_size:t,sku:e,singleOptionsData:i,sizes:a,selectedOption:s,is_option:d,option:l,isOptionLoaded:r,user_comment:p,errorCode:u,selectedPdpPopupInfo:c,showproductInfoPopup:h,isSKUChanged:v,uploadRequiredErr:g,responseMessage:m,show_user_comment_box:P,enable_product_combination:D,download_template:w,showOrientationBasedSizes:O,popupAddedClass:y,childPkgProductData:b,activePkgProduct:f,isDisplayPackageProduct:S}=this.state,{reviewType:k,priceData:T,storedata:C,breadcrumbsData:j,productData:z,isReviewPage:q,isPrintready:U,eventType:L,pageRouteUrl:M,yotpoData:E,isNewPDPOptionPage:ta,isNewReviewOptionPage:ts,isAbUrl:tn}=this.props,td=this.state.responseMessage||g,tl=!0==d&&(null==l?void 0:l.hasHardwareOption)==!0&&(null==l?void 0:l.defaultOption)=="hardwareOption",tr=!0==d&&!0==l.hasGraphicsOption,tp=!0==d&&(null==l?void 0:l.hasHardwareOption)==!0&&"hardwareOption"!=l.defaultOption,tu=!0==d&&!0==l.hasCustomOption,tc=4==L?"Admin_Edit":"Admin_Add",th="designtool"===k,tv=tn&&(tn||C.deviceType<3);if(!0!=r)return"";{var tg,tm,tP,t_,tD,tw,tO,ty,tb,tf,tS;let d=l&&!0==l.hasGraphicsOption&&!0==l.hasHardwareOption;return(0,o.jsx)(n.Fragment,{children:(0,o.jsxs)(I.Z,{className:"productOptionsMainBox kiran ".concat(tn?"productOptionsMainBoxabUrl":""),ref:t=>this.stickyBox=t,children:[q&&(0,o.jsxs)("div",{className:"pageTitleBox productReviewTitleBox",children:[(0,o.jsx)("h2",{children:"Review Product"}),(0,o.jsx)("p",{children:"Finishing options shown in the preview can be different than your selection. This preview is solely for the purpose of viewing the design in a lifestyle setting."})]}),(1==C.deviceType||2==C.deviceType)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"productInfoGroup productInfoMobileBox orderaddeditcase  mobileTabcase",children:(0,o.jsx)(Q.default,{productData:z,yotpoData:E,storedata:C,isNewReviewOptionPage:ts,isNewPDPOptionPage:ta,breadcrumbsData:j,gallery:null==z?void 0:z.np_gallery,eventType:L,pageRouteUrl:M,setActiveTab:null===(tg=this.props)||void 0===tg?void 0:tg.setActiveTab,customerGroupId:this.props.customerGroupId,pdpOffer:this.state.pdpOffer,isAdminPage:!0,isDisplayPackageProduct:S},"product-info")}),(0,o.jsx)("div",{className:"clearfix"})]}
1),(0,o.jsx)("div",{className:_()("productGalleryBox","sticky-box",this.state.mode,{"is-sticky":this.state.isSticky||!0}),children:this.renderGallerySection()}),(0,o.jsxs)("div",{className:"newCROOptionBox ".concat(tn?"newCROOptionBoxAburl":""),children:[(null===(tP=this.newProductPrice)||void 0===tP?void 0:null===(tm=tP.state)||void 0===tm?void 0:tm.displaySelectOptions)?(0,o.jsx)("div",{className:"pricePopupOverlay"}):"",td&&(0,o.jsx)(G.default,{content:this.state.responseMessage?m:g||"",alerttype:"danger"}),!0===U?1!=C.deviceType&&2!=C.deviceType?(0,o.jsxs)("div",{className:"productInfoGroup orderaddeditcase editdesktcase",children:[(0,o.jsx)(Q.default,{productData:z,yotpoData:E,storedata:C,isNewReviewOptionPage:ts,isNewPDPOptionPage:ta,breadcrumbsData:j,gallery:null==z?void 0:z.np_gallery,pageRouteUrl:M,eventType:L,setActiveTab:null===(t_=this.props)||void 0===t_?void 0:t_.setActiveTab,customerGroupId:this.props.customerGroupId,pdpOffer:this.state.pdpOffer,isAdminPage:!0,isDisplayPackageProduct:S},"product-info")," "]}):(0,o.jsx)(o.Fragment,{}):(0,o.jsx)("div",{className:"productInfoGroup orderaddeditcase pdpcase",children:1!=C.deviceType?(0,o.jsx)(Q.default,{productData:z,yotpoData:E,storedata:C,isNewPDPOptionPage:ta,breadcrumbsData:j,gallery:null==z?void 0:z.np_gallery,pageRouteUrl:M,eventType:L,setActiveTab:this.props.setActiveTab,customerGroupId:this.props.customerGroupId,pdpOffer:this.state.pdpOffer,isAdminPage:!0,isDisplayPackageProduct:S},"product-info"):(0,o.jsx)(o.Fragment,{})}),(0,o.jsxs)("div",{className:"newPDPOptionBox ".concat(tn?"newPDPOptionBoxAnUrl":""),children:[(0,o.jsxs)("div",{className:"optionControlGroupBox",style:this.state.isLoadingStatus?{pointerEvents:"none"}:{},children:[(null===(tw=this.props)||void 0===tw?void 0:null===(tD=tw.productData)||void 0===tD?void 0:tD.wallet_offer_message)&&(0,o.jsx)(R.default,{walletOfferMsg:null===(ty=this.props)||void 0===ty?void 0:null===(tO=ty.productData)||void 0===tO?void 0:tO.wallet_offer_message}),(0,o.jsx)("div",{style:{display:r?"initial":!0===v?"initial":"none"},children:(0,o.jsxs)("div",{style:!1==r?{opacity:"0.3"}:{},children:[(0,o.jsx)(B.default,{storedata:C,combinationTypes:this.state.combinationTypes,handleOptionChange:this.handleOptionChange,setCombinationTypes:this.setCombinationTypes,productData:this.props.productData,isOptionsAvailable:this.state.option,isDisplayPackageProduct:S,isAbUrl:tn}),S&&(null==b?void 0:b.length)>0&&(0,o.jsx)(ti.default,{childPkgProductData:b,activePkgProduct:f,handleChangeActivePkgProduct:this.handleChangeActivePkgProduct,handleOptionChange:this.handleOptionChange,isPrintreadyDesign:th,enable_product_combination:D,storedata:C,onBlur:this.onOptionBlur,isHeaderHidden:d,config:{datalayer:!0,customerId:this.props.customerId,isPrintready:this.props.isPrintready,pOptionData:x.kH,mainProductName:null==z?void 0:z.name,pageType:tc,eventType:L,isNewPDPOptionPage:ta,isNewReviewOptionPage:ts,sku:z.sku,productCategory:j},breadcrumbsData:j,uploadRequiredErr:this.state.uploadRequiredErr,toggleProductInfoPopup:this.toggleProductInfoPopup,isReviewPage:this.props.isReviewPage,setGalleryHoverImage:this.setGalleryHoverImage,productData:z,combinationTypes:this.state.combinationTypes,isLoadingStatus:this.state.isLoadingStatus}),1==t&&(0,o.jsx)(o.Fragment,{children:tn?(0,o.jsx)(X.default,{data:a,handleChange:this.handleChange,selectedOption:s,isDisabled:th,onBlur:this.onOptionBlur,eventType:L,errorCode:u,isDisplayOrientation:this.state.isDisplayOrientation,orientation:this.state.orientation,config:{pOptionData:x.kH,isNewPDPOptionPage:ta,isNewReviewOptionPage:ts,isReviewPage:q,productCategory:j,mainProductName:null==z?void 0:z.name,sku:null==z?void 0:z.sku},storedata:C,priceData:T,salePriceData:null==T?void 0:T.sale_price,orientationBasedSizes:this.state.orientationBasedSizes,handleOrientationChange:this.handleOrientationChange,sizeTabChange:this.sizeTabChange,handleSizeTab
1Change:this.handleSizeTabChange,show_orientation:O,isAbUrl:tn},"NewPDPSizeSectionForAB"):(0,o.jsx)(te.default,{data:a,handleChange:this.handleChange,selectedOption:s,isDisabled:th,onBlur:this.onOptionBlur,eventType:L,errorCode:u,isDisplayOrientation:this.state.isDisplayOrientation,orientation:this.state.orientation,config:{pOptionData:x.kH,isNewPDPOptionPage:ta,isNewReviewOptionPage:ts,isReviewPage:q},storedata:C,priceData:T,salePriceData:null==T?void 0:T.sale_price,orientationBasedSizes:this.state.orientationBasedSizes,handleOrientationChange:this.handleOrientationChange,sizeTabChange:this.sizeTabChange,handleSizeTabChange:this.handleSizeTabChange,show_orientation:O},"NewPDPSizeSection")}),!t&&w&&(0,o.jsx)(F.Z,{templateUrl:w},"download-template"),(0,o.jsx)(A.Z,{className:"pdpoptionpanel ".concat(tn?"pdpoptionpanelAburl":""),children:(0,o.jsxs)(N.e,{shouldRenderAsPanel:tv,clickOnArrowOnly:!0,activeKey:"pdp"===this.state.pdpVsAddonOpenGroup?this.state.pdpOpenPanelKey:null,onSelect:this.handlePdpAddonAccordionPdpSelect,children:[tl&&!S&&(0,o.jsx)(H.default,{uniqueKey:"hardware-priority-optionsection",data:l.hardwareOption,handleOptionChange:this.handleOptionChange,type:"hardwareOption",isPrintreadyDesign:th,optionPrice:null==T?void 0:T.options_price,headerPrice:null==T?void 0:T.hardwarePrice,enable_product_combination:D,storedata:C,addSeparator:!0==l.hasGraphicsOption&&!0==l.hasHardwareOption||l.hardwareOption&&l.hardwareOption.options&&l.hardwareOption.options.length>0,onBlur:this.onOptionBlur,isHeaderHidden:d,config:{datalayer:!0,customerId:this.props.customerId,isPrintready:this.props.isPrintready,pOptionData:x.kH,mainProductName:null==z?void 0:z.name,pageType:tc,eventType:L,isNewPDPOptionPage:ta,isNewReviewOptionPage:ts,sku:z.sku,productCategory:j},highlightClass:null==y?void 0:y.hardwareOptionClass,breadcrumbsData:j,uploadRequiredErr:this.state.uploadRequiredErr,toggleProductInfoPopup:this.toggleProductInfoPopup,isReviewPage:this.props.isReviewPage,setGalleryHoverImage:this.setGalleryHoverImage,isAbUrl:tn,twoSideOptions:this.state.twoSidedOptionsList,setShowDiv:this.setShowDiv}),tr&&!S&&(0,o.jsx)(H.default,{uniqueKey:"graphic-optionsection",data:l.graphicsOption,handleOptionChange:this.handleOptionChange,type:"graphicsOption",isPrintreadyDesign:th,optionPrice:null==T?void 0:T.options_price,headerPrice:null==T?void 0:T.graphicsPrice,enable_product_combination:D,storedata:C,addSeparator:!0==l.hasGraphicsOption&&!0==l.hasHardwareOption||l.graphicsOption&&l.graphicsOption.options&&l.graphicsOption.options.length>0,onBlur:this.onOptionBlur,toggleProductInfoPopup:this.toggleProductInfoPopup,isHeaderHidden:d,config:{datalayer:!0,customerId:this.props.customerId,isPrintready:this.props.isPrintready,pOptionData:x.kH,mainProductName:null==z?void 0:z.name,pageType:tc,eventType:L,isNewPDPOptionPage:ta,isNewReviewOptionPage:ts,sku:z.sku,productCategory:j},highlightClass:null==y?void 0:y.graphicsOptionClass,breadcrumbsData:j,uploadRequiredErr:this.state.uploadRequiredErr,isReviewPage:this.props.isReviewPage,setGalleryHoverImage:this.setGalleryHoverImage,isAbUrl:tn,twoSideOptions:this.state.twoSidedOptionsList,setShowDiv:this.setShowDiv}),tp&&!S&&(0,o.jsx)(H.default,{uniqueKey:"hardware-optionsection",data:l.hardwareOption,handleOptionChange:this.handleOptionChange,type:"hardwareOption",isPrintreadyDesign:th,optionPrice:null==T?void 0:T.options_price,headerPrice:null==T?void 0:T.hardwarePrice,enable_product_combination:D,storedata:C,addSeparator:!0==l.hasGraphicsOption&&!0==l.hasHardwareOption||l.hardwareOption&&l.hardwareOption.options&&l.hardwareOption.options.length>0,onBlur:this.onOptionBlur,isHeaderHidden:d,config:{datalayer:!0,customerId:this.props.customerId,isPrintready:this.props.isPrintready,pOptionData:x.kH,mainProductName:null==z?void 0:z.name,pageType:tc,eventType:L,isNewPDPOptionPage:ta,isNewReviewOptionPage:ts,sku:z.sku,productCategory:j},highlightClass:null==y?void 0:y.hardwareOptionClass,breadcrumbsData:j,uploadRequiredErr:this.state.uploadRequiredErr,toggleProductInfoPopup:this.toggleProductInfoPopup,isReviewPage:this.props.isReviewPage,setGalleryHoverImage:this.setGalleryHoverImage,isAbUrl:tn,twoSideOptions:this.state.twoSidedOptionsList,setShowDiv:this.setShowDiv}),tu&&!S&&(0,o.jsx)(Z.default,{productName:null==z?void 0:z.name,data:l.customOption,handleOptionChange:this.handleOptionChange,type:"customOption",storedata:C,optionPrice:null==T?void 0:T.options_price,enable_product_combination:D,onBlur:this.onOptionBlur,config:{datalayer:!0,customerId:this.props.customerId,isPrintready:this.props.isPrintready,pOptionData:x.kH,mainProductName:null==z?void 0:z.name,pageType:tc,eventType:L,isNewPDPOptionPage:ta,isNewReviewOptionPage:ts,sku:z.sku,productCategory:j},breadcrumbsData:j,toggleProductInfoPopup:this.toggleProductInfoPopup,setGalleryHoverImage:this.setGalleryHoverImage,isAbUrl:tn,twoSideOptions:this.state.twoSidedOptionsList,setShowDiv:this.setShowDiv},"custom-optionsection")]})},"pdpOptionsPanel"),!0===P&&P&&!tn&&(0,o.jsx)("div",{className:"newCommentBox commentMainBox",children:(0,o.jsxs)("div",{className:"formGroup",children:[(0,o.jsx)("label",{htmlFor:"user_comment",children:"Specific Instru
1ctions (Optional)"}),(0,o.jsx)("textarea",{id:"user_comment",className:"textinstruction",name:"user_comment",value:p,onChange:t=>this.onCommentChange(t.target.name,t.target.value),onMouseDown:t=>t.target.focus()})]})}),!S&&(0,o.jsx)(K.default,{singleOptionsData:i,isAbUrl:tn,showBorderTop:this.state.showBorderTop&&tn}),(0,o.jsx)("div",{className:"newCommentBox commentMainBox",style:{display:"none"},children:(0,o.jsxs)("div",{className:"formGroup",children:[(0,o.jsx)("label",{htmlFor:"hidden_attribute",children:"Hidden Attribute"}),(0,o.jsx)("textarea",{id:"hidden_attribute",className:"textinstruction",name:"hidden_attribute",value:this.state.otherParams.hidden_attribute,onChange:t=>this.onCommentChange(t.target.name,t.target.value),onMouseDown:t=>t.target.focus()})]})}),h&&(0,o.jsx)(W.Z,{onClose:t=>this.toggleProductInfoPopup(t),data:null==c?void 0:c.option,handleOptionChange:this.handleOptionChange,isPrintreadyDesign:th,storedata:C,type:null==c?void 0:c.type,isHeader:null==c?void 0:c.isHeader,config:{eventType:L,isNewPDPOptionPage:ta,isNewReviewOptionPage:ts},isAbUrl:tn})]})}),!1==r&&!1===v&&(0,o.jsx)(V.Z,{}),Object.keys(this.state.quantity).length>0&&!(null===(tb=this.state.quantity)||void 0===tb?void 0:tb.is_remove_qty)&&1==C.deviceType&&!tn&&(0,o.jsxs)("div",{className:"QuantityMobileBox ".concat(tn?"QuantityMobileBoxAburl":""),children:[(0,o.jsx)("label",{children:"Quantity"}),(0,o.jsx)(Y.default,{data:this.state.quantity,handleChange:this.handleChange,storedata:C,onBlur:this.onOptionBlur,config:{pOptionData:x.kH,isNewPDPOptionPage:ta,isNewReviewOptionPage:ts},className:ta||ts?"newQuantityBox":"ReadMoreText",productData:z,discountText:"Save More"},"quantitybox")]}),1==L&&(null===(tf=this.state.shippingDetail)||void 0===tf?void 0:tf.enable_pdp_page_shipping_option)&&!tn&&(0,o.jsx)($.Z,{priceData:T,productData:z,stateData:this.state,productType:""}),!S&&(0,o.jsx)(J.Z,{data:this.state.quantity,handleChange:this.handleChange,storedata:C,onBlur:this.onOptionBlur,config:{pOptionData:x.kH,isNewPDPOptionPage:ta,isNewReviewOptionPage:ts},className:ta||ts?"newQuantityBox":"ReadMoreText",productData:z,discountText:"Save More",isAbUrl:tn,priceData:T}),Object.keys(this.state.quantity).length>0&&!(null===(tS=this.state.quantity)||void 0===tS?void 0:tS.is_remove_qty)&&1==C.deviceType&&tn&&(0,o.jsxs)("div",{className:"QuantityMobileBox ".concat(tn?"QuantityMobileBoxAburl":""),children:[(0,o.jsx)("label",{children:"Quantity"}),(0,o.jsx)(Y.default,{data:this.state.quantity,handleChange:this.handleChange,storedata:C,onBlur:this.onOptionBlur,config:{pOptionData:x.kH,isNewPDPOptionPage:ta,isNewReviewOptionPage:ts},className:ta||ts?"newQuantityBox":"ReadMoreText",productData:z,discountText:"Save More"},"quantitybox")]}),(0,o.jsx)("div",{className:"clearfix"})]}),(0,o.jsx)(tt.Z,{className:_()(!0==this.state.displaySelectOptions?"productPriceMainBox BtnPricePopup":"productPriceMainBox","sticky-box",this.state.mode,{"is-sticky":this.state.isSticky||!0},{UploadPopup:this.state.showUploadArtworkPopup}),children:(0,o.jsx)(to.default,{isLoadingStatus:this.state.isLoadingStatus,buttonStatus:this.getButtonStatus(l,r),onClickUpdateOrder:this.onClickUpdateOrder,isPrintready:U,eventType:L,sku:e,priceData:T,breadcrumbsData:j,quantity:this.state.quantity,isNewPDPOptionPage:this.state.isNewPDPOptionPage,isNewReviewOptionPage:this.state.isNewReviewOptionPage,productData:this.props.productData,handleChange:this.handleChange,onOptionBlur:this.onOptionBlur,ctaLoader:this.state.ctaLoader,option:l})})]})]})]})})}}constructor(t){var e,i,a,s,d,l,r,p,u,c;
1super(t),e=this,this.handleSizeTabChange=t=>{this.sizeTabChange=t},this.getPatternFilterContext=function(){var t,i;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,a={...(null===(t=e.props.reviewOptions)||void 0===t?void 0:t.otherParams)||{},...(null===(i=e.state)||void 0===i?void 0:i.otherParams)||{},...o||{}},s=(null==a?void 0:a.isDtStpFlow)==1||(null==a?void 0:a.isDtStpFlow)==="1",n=!s&&((null==a?void 0:a.isDtPdpFlow)==1||(null==a?void 0:a.isDtPdpFlow)==="1");return{isEditDrawer:!1,isDtstpLine:s,isDtpdpLine:n,urlMethod:s?"DTSTP":n?"DTPDP":"DT",isNewDtAb:!1}},this.applyPatternFilter=(t,e,i,o)=>{let a=(0,M.Br)(t,e,i,o);return(0,M.gG)(t,a)?{option:a,changed:!0}:{option:t,changed:!1}},this.getOrderApiState=()=>{var t,e,i;let o=null===(e=this.state.allOptions)||void 0===e?void 0:null===(t=e.graphicsOption)||void 0===t?void 0:t.options;if(!(0,M.C)(o))return this.state;let a=this.state.buttons||(null===(i=this.state.priceData)||void 0===i?void 0:i.buttons),s=this.getPatternFilterContext(),n=(0,M.NU)(a,s,this.state.allOptions),d=(0,M.Wv)(this.state.option,this.state.allOptions,n);return{...this.state,option:d}},this.onResize=()=>{ts(()=>{this.setState({mode:(0,U.z_)(this.state.deviceMediumMinWidthInPixels),isSticky:!1})})},this.onScroll=()=>{let t=m.findDOMNode(this.stickyBox);t&&ts(()=>{let e=t.getBoundingClientRect(),i=this.state.isSticky;if("is-bottom"===this.state.mode&&e.top>=-1&&e.top<=1)i=!0;else if("is-bottom"===this.state.mode){let t=Math.max(window.innerHeight,0);i=e.bottom+250>=t}i!==this.state.isSticky&&this.setState({isSticky:i})})},this.initiateOptionState=t=>{var e,i,o,a,s,n,d,l,r,p;let{productData:u,isPrintready:c}=this.props;if(!0==this.isUploadOptionCheck("multi_color",t)&&!1==c){let{option:e}=t;if(e.hasGraphicsOption&&e.graphicsOption&&e.graphicsOption.options&&e.graphicsOption.options.length>0){let t=null==e?void 0:null===(n=e.graphicsOption)||void 0===n?void 0:n.options,i=t&&t.find(t=>"multi_color"==t.option_input_type);null==i||null===(d=i.child_options)||void 0===d||d.forEach(t=>{null==t||delete t.selected})}}let h=(0,q.Sw)({option:null==t?void 0:t.option,newOption:null==t?void 0:t.option,rules:null==t?void 0:t.rules,sizes:null==t?void 0:t.sizes,quantity:null==t?void 0:t.quantity,addon:null==t?void 0:t.addon,newAddon:null==t?void 0:t.addon});console.log("RULES APPLIEDD!!",h),4==this.props.eventType&&3==this.props.itemType&&"artwork"==this.props.reviewType&&(null==t?void 0:null===(e=t.otherParams)||void 0===e?void 0:e.uniqueHQId)&&(null===(p=this.props.uploadContext)||void 0===p||p.fetchAndSetUploads(null==t?void 0:null===(l=t.otherParams)||void 0===l?void 0:l.uniqueHQId,null===(r=this.props.productData)||void 0===r?void 0:r.name));let v=this.getPatternFilterContext(null==t?void 0:t.otherParams),g=(0,M.Br)(null==h?void 0:h.option,null==t?void 0:t.buttons,null==t?void 0:t.option,v),m={...h,option:g},P={sku:t.sku,isOptionLoaded:!0,is_size:t.is_size,sizes:t.sizes,quantity:t.quantity,is_option:t.is_option,allOptions:(0,O.Z)(t.option),option:g,rules:(null==t?void 0:t.rules)||[],allAddons:t.addon?(0,O.Z)(t.addon):{},addon:h.addon?h.addon:{},buttons:t.buttons,prevOptionData:(0,O.Z)((0,w.Z)(t,["sizes","quantity","option","addon"])),show_user_comment_box:t.show_user_comment_box,enable_product_combination:(null==t?void 0:null===(i=t.product_combination)||void 0===i?void 0:i.enable_product_combination)||!1,orientationBasedSizes:null==t?void 0:t.orientationBasedSizes,user_comment:(null==t?void 0:null===(o=t.otherParams)||void 0===o?void 0:o.user_comment)||"",showOrientationBasedSizes:null==t?void 0:t.show_orientation,otherParams:{...this.state.otherParams,...(null==t?void 0:null===(a=t.otherParams)||void 0===a?void 0:a.isDtStpFlow)!=null?{isDtStpFlow:t.otherParams.isDtStpFlow}:{},...(null==t?void 0:null===(s=t.otherParams)||void 0===s?void 0:s.stepRepeatPattern)?{stepRepeatPattern:t.otherParams.stepRepeatPattern}:{}}};(null==u?void 0:u.child_products)&&(null==u?void 0:u.child_products.length)>0&&(t.isDisplayPackageProduct=!0);let _=(0,U.ZQ)(t);if(_){P.combinationTypes=_;let t=this.setSingleOptionData(m,_);P.singleOptionsData=t}else{P.combinationTypes=null;let t=this.setSingleOptionData(m,null);P.singleOptionsData=t}(null==t?void 0:t.download_template)&&(P.download_template=t.download_template),this.setState(P,()=>{this.props.actions.isLoading(!1),this.loadPrice()})},this.setSingleOptionData=(t,e)=>{var i,o,a,s;let n=[];if(e&&(null===(i=e.child_options)||void 0===i?void 0:i.length)>0){let i=(0,y.Z)(e.child_options,{display_options:!0,selected:!0});if(i){let e=null==t?void 0:t.option;"hardware_selection"===i.option_code&&n.push(...(0,x.oY)(null==e?void 0:e.hardwareOption)),"graphics_selection"===i.option_code&&n.push(...(0,x.oY)(null==e?void 0:e.graphicsOption)),"comb
1inedOption"===i.option_code&&n.push(...(0,x.oY)(null==e?void 0:e.hardwareOption),...(0,x.oY)(null==e?void 0:e.graphicsOption)),n.push(...(0,x.oY)(null==e?void 0:e.customOption))}}else n.push(...(0,x.oY)(null==t?void 0:null===(o=t.option)||void 0===o?void 0:o.hardwareOption),...(0,x.oY)(null==t?void 0:null===(a=t.option)||void 0===a?void 0:a.graphicsOption),...(0,x.oY)(null==t?void 0:null===(s=t.option)||void 0===s?void 0:s.customOption));return n},this.setCombinationTypes=t=>{var e;let i=null===(e=this.state)||void 0===e?void 0:e.option,o=this.setSingleOptionData({option:i},t);this.setState({combinationTypes:t,singleOptionsData:o})},this.handleChangeActivePkgProduct=t=>{this.setState({activePkgProduct:t})},this.handleDataPkgChildProduct=t=>{var e,i,o,a,s;let{childPkgProductData:n,activePkgProduct:d}=this.state;if((null==n?void 0:n.length)==0)return console.error("No child products"),[];let l={isDesignOnline:this.state.isDesignOnline,cdtSizeData:this.state.cdtSizeData,isNewPDPOptionPage:null===(e=this.state)||void 0===e?void 0:e.isNewPDPOptionPage,isNewReviewOptionPage:null===(i=this.state)||void 0===i?void 0:i.isNewReviewOptionPage};if("for_price_call"===t){let t=d?null===(o=this.state.activePkgProduct)||void 0===o?void 0:o.activeProducts:this.state.childPkgProductData,e=(0,y.Z)(null===(a=this.state.combinationTypes)||void 0===a?void 0:a.child_options,["selected",!0]),i=(null==e?void 0:e.option_code)==="graphics_selection"?null==t?void 0:t.filter(t=>{var e,i,o,a;return(null==t?void 0:null===(i=t.options)||void 0===i?void 0:null===(e=i.option)||void 0===e?void 0:e.hasGraphicsOption)&&!(null==t?void 0:null===(a=t.options)||void 0===a?void 0:null===(o=a.option)||void 0===o?void 0:o.hasHardwareOption)}):t;return(null==i?void 0:i.map(t=>{var e,i,o;let a=(0,x.OL)({...null==t?void 0:t.options,...null==t?void 0:t.sizes,...l});return a.quantity=Number((null==t?void 0:null===(e=t.options)||void 0===e?void 0:e.default_min_qty)*(null===(i=this.state.quantity)||void 0===i?void 0:i.default_value)),{product_option:{...a},sku:null==t?void 0:null===(o=t.sizes)||void 0===o?void 0:o.sku}}))||[]}return d&&(null==d?void 0:d.activeProducts)&&n.length>0?null==d?void 0:null===(s=d.activeProducts)||void 0===s?void 0:s.map(t=>{var e,i,o;let a=(0,x.OL)({...null==t?void 0:t.options,...null==t?void 0:t.sizes,...l},!0);return a.quantity=Number((null==t?void 0:null===(e=t.options)||void 0===e?void 0:e.default_min_qty)*(null===(i=this.state.quantity)||void 0===i?void 0:i.default_value)),{product_option:{...a},sku:null==t?void 0:null===(o=t.sizes)||void 0===o?void 0:o.sku}}):[]},this.onCommentChange=(t,e)=>{"hidden_attribute"===t?this.setState({otherParams:{[t]:e}}):this.setState({[t]:e})},this.handleChange=(t,e)=>{!this.state.isLoadingStatus&&("main_quantity"!=e||(0,x.b7)(t))&&(0,x.Cp)(t,e,{...this.state},{datalayer:!1},(i,o)=>{var a,s,n,d,l,r,p,u,c,h,v,m,P,_,D,w,b,f;if("size_w"==e||"size_h"==e||"size_d"===e){let{sizes:t}=i,e=(0,O.Z)(null==t?void 0:t.custom);if(e&&t){let i=(0,y.Z)(null==t?void 0:null===(a=t.size)||void 0===a?void 0:a.field_values,["selected",!0]),o=e[1]?"".concat(e[0].default_value,"x").concat(e[1].default_value):e[0].default_value,r=(0,g.Z)(null==t?void 0:null===(s=t.size)||void 0===s?void 0:s.field_values,t=>t.value==o),p=(0,y.Z)(null==t?void 0:null===(n=t.size)||void 0===n?void 0:n.field_values,t=>t.value==o);if(-1!==r&&i&&(i.selected=!1,p.selected=!0),-1==r&&(null==t?void 0:null===(d=t.size)||void 0===d?void 0:d.field_values.length)>0){let e=null==t?void 0:null===(l=t.size)||void 0===l?void 0:l.field_values;e[0].selected=!0,e.map((t,e)=>0!=e?t.selected=!1:null)}}}let S=(0,O.Z)(i);if("size"==e&&(null==t?void 0:t.value)=="setStandardSize"){let t=null==S?void 0:null===(c=S.sizes)||void 0===c?void 0:null===(u=c.size)||void 0===u?void 0:null===(p=u.field_values)||void 0===p?void 0:null===(r=p.find)||void 0===r?void 0:r.call(p,t=>!0==t.selected);if(t){let e=null==t?void 0:t.value.split("x"),i=e&&Number(e[0]),o=e&&Number(e[1]),a=null==S?void 0:null===(m=S.sizes)||void 0===m?void 0:null===(v=m.custom)||void 0===v?void 0:null===(h=v.find)||void 0===h?void 0:h.call(v,t=>"size_w"===t.field_code),s=null==S?void 0:null===(D=S.sizes)||void 0===D?void 0:null===(_=D.custom)||void 0===_?void 0:null===(P=_.find)||void 0===P?void 0:P.call(_,t=>"size_h"===t.field_code),n=null==S?void 0:null===(f=S.sizes)||void 0===f?void 0:null===(b=f.custom)||void 0===b?void 0:null===(w=b.find)||void 0===w?void 0:w.call(b,t=>"size_d"===t.field_code);a&&s?(a.default_value=i,s.default_value=o):n&&(n.default_value=i)}}S.selectedOption=e;let k=(0,q.Sw)({option:S.allOptions,newOption:S.option,rules:this.state.rules,sizes:S.sizes,quantity:S.quantity,addon:null==S?void 0:S.allAddons,newAddon:null==S?void 0:S.addon}),{option:T}=this.applyPatternFilter(null==k?void 0:k.option,S.buttons||this.state.buttons,S.allOptions,this.getPatternFilterContext());S.option=T,S.addon=null==k?void 0:k.addon,S.singleOptionsData=this.setSingleOptionData({...k,option:T},this.state.combinationTypes),this.setState(S,()=>{!0==o&&this.loadPrice()})})},this.handleOrientationChange=t=>
1{t&&t!==this.sizeTabChange&&(this.setState(e=>{var i,o,a,s,n,d,l;let r=null==e?void 0:null===(a=e.sizes)||void 0===a?void 0:null===(o=a.custom)||void 0===o?void 0:null===(i=o.find)||void 0===i?void 0:i.call(o,t=>"size_w"===t.field_code),p=null==e?void 0:null===(d=e.sizes)||void 0===d?void 0:null===(n=d.custom)||void 0===n?void 0:null===(s=n.find)||void 0===s?void 0:s.call(n,t=>"size_h"===t.field_code),u=null===(l=e.orientationBasedSizes[t][0])||void 0===l?void 0:l.value.split("x");return r&&p&&(r.default_value=Number(u[0]),p.default_value=Number(u[1])),{...e,orientation:t,sizes:{...e.sizes,field_selection:"size",size:{...e.sizes.size,field_values:e.orientationBasedSizes[t]}}}}),this.sizeTabChange=t,this.loadPrice())},this.onOptionBlur=(t,e)=>{var i,o;if(this.state.isLoadingStatus)return;let{isDisplayPackageProduct:a}=this.state.isDisplayPackageProduct,s=a?(0,w.Z)(this.state.activePkgProduct,["sizes","quantity","option","addon"]):(0,w.Z)(this.state,["sizes","quantity","option","addon"]),n=a?{...(null===(o=this.state)||void 0===o?void 0:null===(i=o.activePkgProduct)||void 0===i?void 0:i.prevOptionData)||{}}:{...this.state.prevOptionData};(0,x.n_)(t,e,{...s},{...n||{}},{datalayer:!1},t=>{"size_w"==e?this.setState({prevOptionData:(0,O.Z)(s)},()=>{!0==t&&this.loadPrice(e)}):!0==t&&this.loadPrice()})},this.handleOptionChange=function(t,i,o,a){var s,n,d;let l=arguments.length>4&&void 0!==arguments[4]&&arguments[4],{productData:r}=e.props,{option:p}=e.state;if((0==p.length||0==Object.values(p).length)&&(null==r?void 0:r.is_package_product_enable)=="1"&&(null==r?void 0:r.child_products)&&(null==r?void 0:null===(s=r.child_products)||void 0===s?void 0:s.length)>0&&((null==t?void 0:t.option_code)=="combinedOption"||(null==t?void 0:t.option_code)=="graphics_selection")){(null===(d=e.state.activePkgProduct)||void 0===d?void 0:null===(n=d.selectedFilter)||void 0===n?void 0:n.option_code)!=(null==t?void 0:t.option_code)&&setTimeout(()=>{e.loadPrice()},100);return}(0,x.Cu)(t,i,o,a,{...e.state},{datalayer:!1},async(t,o)=>{let s=(0,q.Sw)({option:t.allOptions,newOption:t.option,rules:e.state.rules,sizes:t.sizes,quantity:t.quantity,addon:null==t?void 0:t.allAddons,newAddon:null==t?void 0:t.addon}),{option:n}=e.applyPatternFilter(null==s?void 0:s.option,t.buttons||e.state.buttons,t.allOptions,e.getPatternFilterContext());t.option=n,t.addon=null==s?void 0:s.addon,t.singleOptionsData=e.setSingleOptionData({...s,option:n},e.state.combinationTypes),e.setState(t,()=>{var t,s,n;if(!0==o){if(a&&e.state.priceData){let t=e.state.priceData;i.includes("graphics_selection")?t.graphicsPrice=null:t.hardwarePrice=null,e.setState({priceData:(0,O.Z)(t)},()=>{e.loadPrice()})}else e.loadPrice()}else(0,y.Z)(null===(n=e.state)||void 0===n?void 0:null===(s=n.addon)||void 0===s?void 0:null===(t=s.selection)||void 0===t?void 0:t.child_options,{display_options:!0,selected:!0})&&"addon_selection"===i&&e.loadPrice()})},!1,l)},this.handleAddonProductChange=(t,e,i)=>{let o=this.state.addon.addon_products,a=(0,g.Z)(o,["sku",e]);o[a].product_option=t,this.setState(t=>({addon:{...t.addon,addon_products:o}}),()=>{!0==i&&this.loadPrice()})},this.getUpdateOptionData=()=>({...(0,x.OL)({...this.getOrderApiState()},!0),mpn:this.state.mpn,user_comment:this.state.user_comment,orderId:this.props.orderId}),this.loadPrice=async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.setState({isLoadingStatus:!0},async()=>{var o,a,s,n,d,l,r,p,u,c;let h=(0,f.createHeader)(e.props.storedata);(null===(o=e.props)||void 0===o?void 0:o.eventType)==4&&(null===(s=e.props)||void 0===s?void 0:null===(a=s.productData)||void 0===a?void 0:a.isDisplayPackageProduct)&&(null===(d=e.props)||void 0===d?void 0:null===(n=d.productData)||void 0===n?void 0:n.child_products.length)>0&&!e.state.isLoaded&&e.setState(t=>{var i,o,a,s;return{isLoaded:!0,quantity:{...t.quantity,default_value:null===(s=e.props)||void 0===s?void 0:null===(a=s.productData)||void 0===a?void 0:null===(o=a.child_products)||void 0===o?void 0:null===(i=o[0])||void 0===i?void 0:i.parent_product_qty}}});let v=(0,x.OL)(e.getOrderApiState());if((null===(r=e.props)||void 0===r?void 0:null===(l=r.productData)||void 0===l?void 0:l.child_products)&&(null===(c=e.props)||void 0===c?void 0:null===(u=c.productData)||void 0===u?void 0:null===(p=u.child_products)||void 0===p?void 0:p.length)>0){let t=e.handleDataPkgChildProduct("for_price_call");t&&(null==t?void 0:t.length)>0&&(null==t||delete t.isNewPDPCro,v={...v,childProducts:t})}await e.props.actions.getProductPrice(v,h).then(async o=>{if(400===o.responseCode||404===o.responseCode||500===o.responseCode){let t=(0,O.Z)((0,w.Z)(e.state,["sizes","quantity","option","addon"]));e.setState({prevOptionData:t,responseMessage:o.message,isLoadingStatus:!1,ctaLoader:"",orientation:"",errorCode:o.errorCode,isDisplayOrientation:!1}),(0,U.SM)()}else{var a,s,n,d,l,r,p,u;let c=(0,O.Z)({isLoadingStatus:!1,ctaLoader:"",responseMessage:null,quantity:e.state.quantity,sizes:e.state.sizes,addon:e.state.addon,orientation:null==o?void 0:null===(a=o.data)||void 0===a?void 0:a.orientation,errorCode:0,priceData:o.data,isDisplayOrientation:null==o?void 0:null===(s=o.data)||void 0===s?void 0:s.orientation_box_display});(null==o?void 0:null===(n=o.data)||void 0===n?void 0:n.orientation)&&"sizes"in v&&"custom"in v.sizes&&(e.sizeTabChange=null==o?void 0:null===(l=o.data)||void 0===l?void 0:l.orientation);let h=c.priceData;c.combinationTypes=(0,U.tH)(e.state.combinationTypes,c.priceData),(null==(c=(0,x.FS)(c,h))?void 0:null===(d=c.addon)||void 0===d?void 0:d.addon_products)&&await (null==c?void 0:null===(p=c.addon)||void 0===p?void 0:null===(r=p.addon_products)||void 0===r?void 0:r.map(async t=>{var e;return null!=h&&h.addon&&null!=h&&h.addon[null==t?void 0:t.sku]&&(t.product_option=await (0,x.FS)(null==t?void 0:t.product_option,null==h?void 0:h.addon[null==t?void 0:t.sku]),t.product_price=null==h?void 0:null===(e=h.addon[null==t?void 0:t.sku])||void 0===e?void 0:e.finalprice),t}));let g={...(0,w.Z)(c,["sizes","quantity","addon"]),option:e.state.option};c.prevOptionData="size_w"==t?(0,O.Z)(e.state.prevOptionData):(0,O.Z)(g),e.setState(c,()=>{i&&(0,U.t$)({...e.state},{...e.props})}),e.state.orientationBasedSizes&&-1===Object.keys(e.state.orientationBasedSizes).indexOf(e.sizeTabChange)&&(e.sizeTabChange=null==o?void 0:null===(u=o.data)||void 0===u?void 0:u.orientation)}})})},this.onClickUpdateOrder=async()=>{var t,e,i,o,a,s,n,d,l,r,p,u,c,h;if(this.isSubmitting)return;this.isSubmitting=!0;let{eventType:v,eventItemId:g,storedata:m,adminAuthKey:P,uploadContext:_,productData:D}=this.props,{otherParams:w}=this.state,{childPkgProductData:O,isDisplayPackageProduct:b}=this.state;if(this.isUploadOptionCheck("upload")||this.isUploadOptionCheck("multi_color")){let t=this.getValidatedOptionData();if(t&&t.status){this.isSubmitting=!1;return}}let S=(0,f.createHeader)(m);
1S.Authorization="Bearer ".concat("68nqgmrrqos1d4ek7wl7yshr2im15j05");let k=this.getUpdateOptionData();4==v&&(k.itemId=g),k.otherParams=this.state.otherParams,k.otherParams.user_comment=k.user_comment,k.user_comment=void 0,k.adminKey=P,k.orderId=this.props.orderId;let T=null!==(n=null!==(s=null==w?void 0:w.isDtStpFlow)&&void 0!==s?s:null===(e=this.props.reviewOptions)||void 0===e?void 0:null===(t=e.otherParams)||void 0===t?void 0:t.isDtStpFlow)&&void 0!==n?n:null==D?void 0:D.isDtStpFlow;if(1==T||"1"===T){k.otherParams.isDtStpFlow=1;let t=(null==w?void 0:w.stepRepeatPattern)||(null===(l=this.props.reviewOptions)||void 0===l?void 0:null===(d=l.otherParams)||void 0===d?void 0:d.stepRepeatPattern)||(null==D?void 0:D.stepRepeatPattern);t&&(k.otherParams.stepRepeatPattern=t)}if((null==D?void 0:D.is_package_product_enable)&&w&&(k.otherParams.is_package_product_enable=null==D?void 0:D.is_package_product_enable),w&&(null==w?void 0:w.is_package_product_enable)&&(k.otherParams.is_package_product_enable=null==w?void 0:w.is_package_product_enable),w&&(null==w?void 0:w.reorder_item_id)&&(k.otherParams.reOrderItemId=null==w?void 0:w.reorder_item_id),w&&(null==w?void 0:null===(i=w.voiceNotes)||void 0===i?void 0:i.length)>0&&(k.otherParams.voiceNotes=null==w?void 0:w.voiceNotes),w&&(null==w?void 0:null===(o=w.hireDesignVoiceNotes)||void 0===o?void 0:o.length)>0&&(k.otherParams.hireDesignVoiceNotes=null==w?void 0:w.hireDesignVoiceNotes),b&&(null==O?void 0:O.length)>0){let t=this.handleDataPkgChildProduct();if(k.otherParams.childProducts=t.length>0?t:[],(null===(r=this.state)||void 0===r?void 0:r.combinationTypes)&&(null===(c=this.state)||void 0===c?void 0:null===(u=c.combinationTypes)||void 0===u?void 0:null===(p=u.child_options)||void 0===p?void 0:p.length)>0){let t=(0,y.Z)(this.state.combinationTypes.child_options,{selected:!0});k.otherParams.packageProductType=null==t?void 0:t.displayLabel}}let x=1===(0,j.n7)(null==w?void 0:w.isNewUAFlow)||1===(0,j.n7)(null===(a=this.props.productData)||void 0===a?void 0:a.isNewUAFlow);k.otherParams.use_same_artwork_for_back=(0,z.mD)(null==w?void 0:w.use_same_artwork_for_back,x,this.state.option,this.props.twoSideOptions);let{isDoubleSideSelected:C,twoSidedOption:I}=await this.getTwoSidedOption();if(null!==I&&(null==I?void 0:I.option_code)&&!1==C){let t=null==k?void 0:null===(h=k.otherParams)||void 0===h?void 0:h.uniqueHQId,{uploads:e}=_,i=(null==e?void 0:e[t])||[];x?k.otherParams.use_same_artwork_for_back=(0,z.mD)(!1,!0,this.state.option,this.props.twoSideOptions):(0,z.z$)(k.otherParams.use_same_artwork_for_back)||(k.otherParams.use_same_artwork_for_back=!1);let o=null==i?void 0:i.filter(t=>(null==t?void 0:t.side)=="front"),a=null==i?void 0:i.filter(t=>(null==t?void 0:t.side)=="back");a.length>0&&(null==a||a.forEach(e=>{let{removeFile:i}=_;i(e,t)})),k.otherParams.artworkFileDriveHQ=(null==o?void 0:o.length)!=0&&k.otherParams.artworkFileDriveHQ}await this.props.actions.updateOrder(k,v,S).then(t=>{!0==t.status?window.location=t.url:(this.setState({responseMessage:t.message}),this.isSubmitting=!1)})},this.getTwoSidedOption=async()=>{var t,e,i,o;let{option:a}=this.state,{twoSideOptions:s,actions:n,storedata:d}=this.props;if(!(null==a?void 0:a.hasGraphicsOption)||!(null===(e=a.graphicsOption)||void 0===e?void 0:null===(t=e.options)||void 0===t?void 0:t.length))return{isDoubleSideSelected:!1,twoSidedOption:null};let l=null==a?void 0:null===(i=a.graphicsOption)||void 0===i?void 0:i.options,r=(0,f.createHeader)(d);if(null==l?void 0:l.length){let t=Array.isArray(s)&&(null==s?void 0:s.length)?s:[];if(!(null==t?void 0:t.length)){let e=await n.getArtworkTwoSideOptionList(r);if(!(null==e?void 0:e.status)||!Array.isArray(e.data)||!e.data.length)return{isDoubleSideSelected:!1,twoSidedOption:null};t=null==e?void 0:e.data}let e=l.find(e=>t.some(t=>(null==t?void 0:t.option_code)===(null==e?void 0:e.option_code))),i=t.find(t=>l.some(e=>(null==e?void 0:e.option_code)===t.option_code));if(!e||(null==e?void 0:null===(o=e.child_options)||void 0===o?void 0:o.length)!==2)return{isDoubleSideSelected:!1,twoSidedOption:null};{let t=null==e?void 0:e.child_options,o=null==i?void 0:i.option_value_1,a=t.find(t=>null==t?void 0:t.selected);return{isDoubleSideSelected:(null==a?void 0:a.value)===o,twoSidedOption:e}}}},this.isUploadOptionCheck=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"upload",i=!1,{option:o}=e.state;if(o.hasGraphicsOption&&o.graphicsOption&&o.graphicsOption.options&&o.graphicsOption.options.length>0){let e=o.graphicsOption.options;(e&&e.findIndex(e=>e.option_input_type==t))>-1&&(i=!0)}return i},this.getValidatedOptionData=()=>{let t;let e=(0,x.OL)(this.state),i=this.isUploadOptionCheck("upload"),o=this.isUploadOptionCheck("multi_color"),a=this.isUploadOptionCheck(j.iK);return!0==i?(t=(0,x.w4)(e),this.setState({uploadRequiredErr:t&&t.msg},()=>{null!=this.state.uploadRequiredErr&&(0,U.SM)()})):!0==o?(t=(0,x.XP)(e,"multi_color"),this.setState({uploadRequiredErr:t&&t.msg},()=>{null!=this.state.uploadRequiredErr&&(0,U.SM)()})):!0==a&&(t=(0,x.XP)(e,j.iK),this.setState({uploadRequiredErr:t&&t.msg},()=>{null!=this.state.uploadRequiredErr&&(0,U.SM)()})),t},this.renderGallerySection=()=>{var t,e,i,a,s;let{priceData:n}=this.state,{isPrintready:d,reviewType:l,storedata:r,productData:p,breadcrumbsData:u,itemType:c,thumbNailImageArr:h,imageUrl:v}=this.props,g={infinite:!1,speed:200,slidesToShow:5,slidesToScroll:1,focusOnSelect:!0,responsive:[{breakpoint:3e3,settings:{slidesToShow:3}},{breakpoint:1024,settings:{slidesToShow:2}},{breakpoint:767,settings:{slidesToShow:1}}],initialSlide:0,dots:1==this.props.storedata.deviceType,swipe:1==this.props.storedata.deviceType,containerClass:"carousel-container",touchThreshold:60,prevArrow:1==r.deviceType?null:(0,o.jsx)("button",{className:"slick-prev",children:"Previous"}),nextArrow:1==r.deviceType?null:(0,o.jsx)("button",{className:"slick-next",children:"Next"})};if(1==c||5==c)return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(E.default,{onRef:t=>this.productGallery=t,gallery:null==p?void 0:p.np_gallery,storedata:r,productData:p,breadcrumbsData:u,selectedImage:(null===(e=this.state)||void 0===e?void 0:null===(t=e.selectedTemplate)||void 0===t?void 0:t.template_id)?this.state.selectedTemplate:null,priceData:n})});if(!0!==d||"designtool"!==l||1==r.deviceType)return(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{className:"galleryMainBox galleryReviewBox",children:[(0,o.jsxs)("div",{className:"staticImgBox",children:[(0,o.jsx)("div",{className:"mainImageBox",children:1==r.deviceType&&(null===(s=this.props.renderMainImages(h))||void 0===s?void 0:s.length)>1?(0,o.jsx)(T.Z,{settings:g,children:this.props.renderMainImages(h)}):(0,o.jsx)("img",{src:v,alt:""})}),(0,o.jsx)("div",{className:"clearfix"}),(0,o.jsx)("div",{className:"galleryThumbBox",children:(0,o.jsx)("ul",{children:this.props.renderThumImages(h)})})]}),(0,o.jsx)("div",{className:"clearfix"}),6==r.storeId&&(0,o.jsxs)("div",{className:"priceGuaranteeBox",children:[(0,o.jsx)("img",{src:"".concat(ta.CDN_FOR_STATIC_DATA,"/static/images/catalog/price-guarantee-icon.png"),alt:""}),(0,o.jsx)("h5",{children:"100% satisfaction Guaranteed!"}),(0,o.jsx)("p",{children:"We promise the best price, product, and service! We have a dedicated customer service department ready to assist you with your order"})]})]})});{let t=h&&Array.isArray(h)&&(null==h?void 0:h.map((t,e)=>({url:(null==t?void 0:t.replaceAll("thumb/",""))||"",id:e,thumb_url:t||"",media_type:"image"})));return(0,o.jsxs)("div",{className:"DesigntoolReview",children:[(0,o.jsx)(E.default,{onRef:t=>this.productGallery=t,gallery:null==t?void 0:t.filter(t=>""!=t.url),storedata:r,productData:p,breadcrumbsData:u,selectedImage:(null===(a=this.state)||void 0===a?void 0:null===(i=a.selectedTemplate)||void 0===i?void 0:i.template_id)?this.state.selectedTemplate:null,priceData:n}),(0,o.jsxs)("div",{className:"EditDT",children:[(0,o.jsx)("div",{className:"clearfix"}),6==r.storeId&&(0,o.jsxs)("div",{className:"priceGuaranteeBox",children:[(0,o.jsx)("img",{src:"".concat(ta.CDN_FOR_STATIC_DATA,"/static/images/catalog/price-guarantee-icon.png"),alt:""}),(0,o.jsx)("h5",{children:"100% satisfaction Guaranteed!"}),(0,o.jsx)("p",{children:"We promise the best price, product, and service! We have a dedicated customer service department ready to assist you with your order"})]})]})]})}},this.toggleProductInfoPopup=(t,e,i,o)=>{let{selectedPdpPopupInfo:a}=this.state;this.setState(s=>({selectedPdpPopupInfo:{...s[a],option:e,type:i,isHeader:o},showproductInfoPopup:t}))},this.handlePdpAddonAccordionPdpSelect=t=>
1{this.setState({pdpVsAddonOpenGroup:t?"pdp":null,pdpOpenPanelKey:t})},this.state={isNewPDPOptionPage:t.isNewPDPOptionPage,isLoadingStatus:!1,uploadRequiredErr:null,isOptionLoaded:!1,is_size:0,sizes:{},quantity:{},is_option:!1,option:{},addon:{},responseMessage:null,mode:"is-top",isSticky:"true",deviceMediumMinWidthInPixels:1170,otherParams:{itemType:t.itemType,designId:t.productData.designId?t.productData.designId:null,tooltype:t.productData.cdtToolType?t.productData.cdtToolType:null,front_image_url:t.productData.front_image_url?t.productData.front_image_url:null,back_image_url:t.productData.back_image_url?t.productData.back_image_url:null,front_image_url_thumb:t.productData.front_image_url_thumb?t.productData.front_image_url_thumb:null,back_image_url_thumb:t.productData.back_image_url_thumb?t.productData.back_image_url_thumb:null,artworkFiles:t.productData.artworkFiles||[],artworkFileDriveHQ:!!t.productData.artworkFileDriveHQ&&t.productData.artworkFileDriveHQ,uniqueHQId:t.productData.uniqueHQId&&void 0!==t.productData.uniqueHQId?t.productData.uniqueHQId:void 0,isLowRes:!!t.productData&&!!t.productData.isLowRes&&t.productData.isLowRes,okWithLowRes:!!t.productData&&!!t.productData.okWithLowRes&&t.productData.okWithLowRes,isUnderline:!!t.productData&&!!t.productData.isUnderline&&t.productData.isUnderline,isVectorUpload:!!t.productData&&!!t.productData.isVectorUpload&&t.productData.isVectorUpload,hireDesignDesc:t.productData&&t.productData.hireDesignDesc?t.productData.hireDesignDesc:"",hireBgSuggestion:t.productData&&t.productData.hireBgSuggestion?t.productData.hireBgSuggestion:[],hireColorPreference:t.productData&&t.productData.hireColorPreference?t.productData.hireColorPreference:[],customer_design_id:t.productData&&t.productData.customer_design_id?t.productData.customer_design_id:null,use_same_artwork_for_back:t.productData&&t.productData.use_same_artwork_for_back?t.productData.use_same_artwork_for_back:null!=t&&null!==(i=t.productData)&&void 0!==i&&!!i.isNewUAFlow&&null,proofRequest:t.productData&&t.productData.proofRequest?t.productData.proofRequest:0,voiceNotes:t.productData&&t.productData.voiceNotes?t.productData.voiceNotes:[],isNewUAFlow:!!t.productData&&!!t.productData.isNewUAFlow&&t.productData.isNewUAFlow,isNewUA:!!t.productData&&!!t.productData.isNewUA&&t.productData.isNewUA,isDtStpFlow:null!==(u=null===(s=t.reviewOptions)||void 0===s?void 0:null===(a=s.otherParams)||void 0===a?void 0:a.isDtStpFlow)&&void 0!==u?u:null===(d=t.productData)||void 0===d?void 0:d.isDtStpFlow,stepRepeatPattern:null!==(c=null===(r=t.reviewOptions)||void 0===r?void 0:null===(l=r.otherParams)||void 0===l?void 0:l.stepRepeatPattern)&&void 0!==c?c:null===(p=t.productData)||void 0===p?void 0:p.stepRepeatPattern},user_comment:t.productData&&t.productData.user_comment?t.productData.user_comment:"",show_user_comment_box:null,singleOptionData:[],isDisplayPackageProduct:!1},this.sliderRef=n.createRef(),this.sizeTabChange="All",this.handleChangeActivePkgProduct=this.handleChangeActivePkgProduct.bind(this),this.handleDataPkgChildProduct=this.handleDataPkgChildProduct.bind(this),this.handleChange=this.handleChange.bind(this),this.onOptionBlur=this.onOptionBlur.bind(this),this.onClickUpdateOrder=this.onClickUpdateOrder.bind(this),this.loadPrice=this.loadPrice.bind(this),this.onCommentChange=this.onCommentChange.bind(this),this.onResize=this.onResize.bind(this),this.setShowDiv=this.setShowDiv.bind(this),this.handlePdpAddonAccordionPdpSelect=this.handlePdpAddonAccordionPdpSelect.bind(this)}}tn.propTypes={customerGroupId:l().any,actions:l().object,storedata:l().object,optionData:l().object,productData:l().object,priceData:l().object,eventType:l().number,isLogin:l().bool,eventItemId:l().number,reviewType:l().string,reviewOptions:l().object,itemType:l().number,orderId:l().number,adminAuthKey:l().string,breadcrumbsData:l().string,isPrintready:l().bool,thumbNailImageArr:l().array,imageUrl:l().string,renderMainImages:l().func,renderThumImages:l().func,isReviewPage:l().bool,pageRouteUrl:l().string,setActiveTab:l().func,yotpoData:l().object,isNewPDPOptionPage:l().bool,isNewReviewOptionPage:l().bool,customerId:l().number,twoSideOptions:l().array,getArtworkTwoSideOptionList:l().func,uploadContext:l().object,isAbUrl:l().bool};var td=(0,L.Z)((0,r.$j)(t=>{var e,i;let{app:o,product:a,customer:s}=t;return{storedata:o.storedata,optionData:a.optionData||{},priceData:a.priceData||{},designTool:a?a.designTool:{},isLogin:s.isLogin,customerGroupId:(null==s?void 0:null===(i=s.profile)||void 0===i?void 0:null===(e=i.customer_extra_fields)||void 0===e?void 0:e.group_code)||"not_logged_in",twoSideOptions:(null==a?void 0:a.twoSideOptions)||[]}},t=>({actions:{getProductPrice:(0,D.DE)(S.mt,t),updateOrder:(0,D.DE)(k.C,t),isLoading:(0,D.DE)(C.hg,t),getArtworkTwoSideOptionList:(0,D.DE)(S.Wk,t)}}
1))(tn)),tl=i(39078),tr=i(64067),tp=i(50399);let{publicRuntimeConfig:tu}=u()();class tc extends n.Component{componentDidMount(){let{productData:t,reviewType:e}=this.props,i="".concat(tu.CDN_FOR_STATIC_DATA,"/static/images/common/not-viewable-print-ready.jpg"),o=!1;switch(e){case"designtool":t.front_image_url&&(i=(0,v.B$)(t.front_image_url),t.back_image_url&&(o=!0));break;case"artwork":if(t.artworkFiles&&t.artworkFiles.length>0){if(i="".concat(tu.CDN_FOR_STATIC_DATA,"/static/images/common/not-viewable-print-ready.jpg"),t.artworkFiles[0].thumbfilePath){var a,n;let e="".concat(this.props.storedata.awsCloudfrontUrl,"/media/").concat(t.artworkFiles[0].thumbfilePath);"-1"!=[".jpeg",".jpg",".gif",".png"].indexOf(null===(n=s().extname(e))||void 0===n?void 0:null===(a=n.toLowerCase)||void 0===a?void 0:a.call(n))&&(i=e)}}else i=(null==t?void 0:t.artworkThumbImg)&&"string"==typeof(null==t?void 0:t.artworkThumbImg)&&(null==t?void 0:t.artworkThumbImg.trim())!==""?t.artworkThumbImg:(null==t?void 0:t.image_url)||"".concat(tu.CDN_FOR_STATIC_DATA,"/static/images/common/sendartworklater.png");break;case"hiredesign":i="".concat(tu.CDN_FOR_STATIC_DATA,"/static/images/catalog/hireadesigner/edithad.jpg")}this.setState({imageUrl:i,hasBackImage:o})}
1render(){let{storedata:t,productData:e,reviewType:i,reviewId:a,data:s,eventType:n,eventItemId:d,productURL:l,orderId:r,adminAuthKey:p,breadcrumbsData:u,itemType:h}=this.props,{imageUrl:v,hasBackImage:g}=this.state,m=6==t.storeId?"".concat(t.domain,"/").concat(l):"".concat(t.domain,"/").concat(l,"/p"),P=this.pickThumImages(e),_=(null==e?void 0:e.is_newpdp_ab)==1;return(0,o.jsx)(c.Z,{className:"productDetailsMainBox ".concat((null==e?void 0:e.is_neonsign)?"neonDetailMainBox":""),id:"errorScrollHere",children:(0,o.jsx)("div",{className:(null==e?void 0:e.is_neonsign)?" ":"container",children:(0,o.jsxs)("div",{className:"productOptionsBox sticky-container",children:[!0==e.is_neonsign?(0,o.jsx)(tl.Z,{isPrintready:4==n,productData:e,setActiveTab:this.setActiveTab,itemType:7,pageRouteUrl:m,eventType:n,breadcrumbsData:u,isNewPDPOptionPage:!0,updateTemplateStatus:this.updateTemplateStatus,productURL:l,isNeonProduct:!0==e.is_neonsign,eventItemId:d,reviewOptions:s,orderId:r,adminAuthKey:p,reviewType:i,reviewId:a,otherParams:null==s?void 0:s.otherParams}):!0==e.is_acrylic?(0,o.jsx)(tr.Z,{setActiveTab:this.setActiveTab,pageRouteUrl:m,isPrintready:4==n,productData:e,itemType:h||5,eventType:n,breadcrumbsData:u,isNewPDPOptionPage:!0,updateTemplateStatus:this.updateTemplateStatus,productURL:l,isNeonProduct:!0==e.is_neonsign,eventItemId:d,reviewOptions:s,orderId:r,adminAuthKey:p,reviewType:i,reviewId:a,otherParams:null==s?void 0:s.otherParams}):1==e.is_assettag?(0,o.jsx)(tp.Z,{isPrintready:4==n,productData:e,setActiveTab:this.setActiveTab,itemType:h,pageRouteUrl:m,eventType:n,breadcrumbsData:u,isNewPDPOptionPage:!0,updateTemplateStatus:this.updateTemplateStatus,productURL:l,isNeonProduct:!0==e.is_neonsign,eventItemId:d,reviewOptions:s,orderId:r,adminAuthKey:p,reviewType:i,reviewId:a,otherParams:null==s?void 0:s.otherParams}):(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(td,{productData:e,reviewT
1ype:i,reviewId:a,reviewOptions:s,itemType:h,eventType:n,eventItemId:d,orderId:r,adminAuthKey:p,breadcrumbsData:u,imageUrl:v,hasBackImage:g,thumbNailImageArr:P,productURL:l,isPrintready:4==n,isReviewPage:4==n,isNewPDPOptionPage:!0,renderMainImages:this.renderMainImages,renderThumImages:this.renderThumImages,pageRouteUrl:m,setActiveTab:this.setActiveTab,isAbUrl:_})}),(0,o.jsx)("div",{className:"clearfix"})]})})})}constructor(t){super(t),this.setMainImage=t=>{this.setState({imageUrl:t.target.src})},this.pickThumImages=t=>(0,v.xN)(t),this.renderMainImages=t=>{var e,i;let a=t&&(null===(i=Object.values(t))||void 0===i?void 0:null===(e=i.filter(t=>void 0!==t))||void 0===e?void 0:e.map((t,e)=>""!=t&&(0,o.jsx)("img",{src:t,alt:""},"ThumbImage-".concat(e))));return(0,h.Z)(a,t=>!1!==t)},this.renderThumImages=t=>t&&Object.values(t).map((t,e)=>""==t?"":(0,o.jsx)("li",{className:this.state.imageUrl===t?"active":"",children:(0,o.jsx)("span",{onClick:()=>this.setMainImage(t),children:(0,o.jsx)("img",{src:t,alt:""})})},"ThumbImage-".concat(e))),this.state={imageUrl:"",isEditDesign:!1,hasError:!1},this.setMainImage=this.setMainImage.bind(this)}}tc.propTypes={productData:l().object,productURL:l().string,reviewType:l().string,reviewId:l().string,data:l().object,imageData:l().object,storedata:l().object,itemType:l().number,eventType:l().number,eventItemId:l().number,orderId:l().number,adminAuthKey:l().string,breadcrumbsData:l().string};var th=(0,r.$j)(t=>{let{app:e}=t;return{storedata:e.storedata}})(tc)}}]);

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.