"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9698],{65460:function(e,t,r){r.d(t,{Z:function(){return f}});var a=r(16835),s=r(67294),n=r(46670),c=r(95894),o=r(28900),l=r(57899),i=r(5147),u=r(77607),d=r(85893);var m=(0,n.Pi)((function(e){var t,r,a=(0,u.$)().t;return(0,d.jsx)(o.Z,{passHref:!0,href:e.orderLineItem.variant.href||"",children:(0,d.jsxs)("a",{children:[(0,d.jsxs)("div",{className:"grid grid-cols-3 gap-8 items-center",children:[(0,d.jsx)("div",{className:"col-span-1",children:null!==(t=e.orderLineItem.variant.mainImage)&&void 0!==t&&t.src?(0,d.jsx)(l.E,{layout:"responsive",objectFit:"contain",width:"200",height:"200",alt:"",image:e.orderLineItem.variant.mainImage,sizes:"200px"}):(0,d.jsx)("div",{className:"placeholder-image",children:e.orderLineItem.variant.name.slice(0,2)})}),(0,d.jsxs)("div",{className:"col-span-2",children:[(0,d.jsx)("div",{style:e.pageTextColor?{color:e.pageTextColor}:{},className:" text-gray-700 font-semibold w-3/4",children:e.orderLineItem.variant.name}),(0,d.jsxs)("div",{style:e.pageTextColor?{color:e.pageTextColor}:{},className:"text-gray-700  text-xs font-medium flex justify-between",children:[(0,d.jsxs)("span",{className:"",children:[e.orderLineItem.quantity," ",a("common:field.quantity")]}),(0,d.jsx)("span",{className:"font-semibold",children:e.orderLineItem.formattedFinalPrice})]}),(0,d.jsx)("div",{children:null===(r=e.orderLineItem.variant.variantValues)||void 0===r?void 0:r.map((function(t){return(0,d.jsxs)("div",{className:"text-gray-400 text-sm",children:[t.variantTypeName,":",(0,d.jsxs)("span",{style:e.pageTextColor?{color:e.pageTextColor}:{},className:"font-medium text-gray-700",children:[" ",t.variantValueName," "]})]},t.variantTypeId+t.variantValueId)}))}),e.refundProcess&&(0,d.jsxs)("div",{className:"text-gray-400 text-sm flex",children:[a("account:refundStatus"),":",function(){var t={text:a("account:refundStatuses.refundApproved"),className:"text-yellow-500"};switch(e.orderLineItem.status){case i.L.REFUNDED:t={text:a("account:refundStatuses.refunded"),className:"text-green-500"};break;case i.L.REFUND_REJECTED:t={text:a("account:refundStatuses.cancelRefunded"),className:"text-red-500"};break;case i.L.REFUND_REQUESTED:t={text:a("account:refundStatuses.requestRefunded"),className:"text-blue-700"}}return(0,d.jsx)("div",{className:"".concat(t.className," font-normal text-sm ml-2"),children:t.text})}()]})]})]})," "]})})})),x=r(30080),f=(0,n.Pi)((function(e){var t=e.order,r=e.orderPackage,n=e.isAccountPage,o=e.pageTextColor,l=t.orderLineItems.filter((function(e){return r.orderLineItemIds.includes(e.id)})),i=(0,u.$)().t,f=s.useState(!0),v=(0,a.Z)(f,2),g=v[0],p=v[1];return(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsxs)("div",{onClick:function(){return p(!g)},className:"font-semibold cursor-pointer justify-between flex text-gray-800 status-title items-center   mb-4",children:[(0,d.jsxs)("div",{className:"flex items-center ",children:[(0,d.jsx)("span",{children:function(){switch(r.orderPackageFulfillStatus){case c.t.UNABLE_TO_DELIVER:return i(n?"account:orderStatuses.unableToDeliver":"common:orderStatuses.unableToDeliver");case c.t.CANCELLED:return i(n?"account:orderStatuses.canceled":"common:orderStatuses.canceled");case c.t.CANCEL_REJECTED:return i(n?"account:orderStatuses.cancelRejected":"common:orderStatuses.cancelRejected");case c.t.REFUND_REJECTED:return i(n?"account:orderStatuses.refundRejected":"common:orderStatuses.refundRejected");case c.t.REFUND_REQUESTED:return i(n?"account:orderStatuses.refundRequested":"common:orderStatuses.refundRequested");case c.t.CANCEL_REQUESTED:return i(n?"account:orderStatuses.cancelRequested":"common:orderStatuses.cancelRequested");case c.t.FULFILLED:return i(n?"account:orderStatuses.fulFilled":"common:orderStatuses.fulFilled");case c.t.DELIVERED:return i(n?"account:orderStatuses.delivered":"common:orderStatuses.delivered");case c.t.READY_FOR_SHIPMENT:return i(n?"account:orderStatuses.readyForShipment":"common:orderStatuses.readyForShipment");case c.t.REFUNDED:return i(n?"account:orderStatuses.refunded":"common:orderStatuses.refunded");case c.t.REFUND_REQUEST_ACCEPTED:return i(n?"account:orderStatuses.refundRequestAccepted":"common:orderStatuses.refundRequestAccepted");case c.t.READY_FOR_PICK_UP:return i(n?"account:orderStatuses.readyForPickUp":"common:orderStatuses.readyForPickUp");default:return i(n?"account:orderStatuses.extraUnfulfilled":"common:orderStatuses.extraUnfulfilled")}}()}),(0,d.jsxs)("span",{className:"text-xs text-gray-600 ml-3 mt-1 flex items-end",children:["( ",t.orderLineItems.filter((function(e){return r.orderLineItemIds.includes(e.id)})).reduce((function(e,t){return e+t.quantity}),0)," ",i("common:product")," )"]})]}),(0,d.jsx)("span",{children:g?(0,d.jsx)(x.rWj,{size:22}):(0,d.jsx)(x.Ix0,{size:22})})]}),(0,d.jsxs)("div",{className:"".concat(g?"flex flex-col":"hidden"),children:[l.map((function(e){return(0,d.jsx)("div",{className:"mb-4 border-b pb-4",children:(0,d.jsx)(m,{orderLineItem:e,pageTextColor:o},e.id)},e.id)})),!!r.trackingInfo&&(0,d.jsx)("div",{className:"border-b pb-4",children:(0,d.jsxs)("div",{className:"flex  flex-col ",children:[(0,d.jsxs)("div",{className:"flex items-center mb-1 ",children:[(0,d.jsxs)("span",{className:"text-gray-500 text-sm whitespace-nowrap",children:[i("common:cargoCompany"),":"]}),(0,d.jsx)("span",{className:"ml-2 text-sm",children:r.trackingInfo.cargoCompany})]}),!!r.trackingInfo.trackingLink&&(0,d.jsxs)("div",{className:"flex text-sm",children:[(0,d.jsxs)("div",{className:"text-gray-500",children:[i("common:trackingNumber"),":"]}),(0,d.jsx)("a",{className:"underline ml-2 text-blue-700",href:r.trackingInfo.trackingLink||"",target:"_blank",children:r.trackingInfo.trackingNumber})]})]})})]})]})}))},58951:function(e,t,r){r(67294);var a=r(57899),s=r(46670),n=r(30080),c=r(77607),o=r(85893);t.Z=(0,s.Pi)((function(e){var t,r,s=(0,c.$)().t;return(0,o.jsxs)("div",{className:"grid grid-cols-6 gap-8 items-center ",children:[(0,o.jsx)("div",{className:"col-span-2 h-24 w-24  relative",children:(null===(t=e.orderLineItem.variant.mainImage)||void 0===t?void 0:t.src)&&(0,o.jsx)(a.E,{layout:"responsive",objectFit:"contain",width:"50",height:"50",image:e.orderLineItem.variant.mainImage,sizes:"100px"})}),(0,o.jsxs)("div",{className:"col-span-4 ",children:[(0,o.jsx)("div",{className:"text-gray-700 font-semibold w-3/4",children:e.orderLineItem.variant.name}),(0,o.jsx)("div",{className:"text-gray-700 mb-2 mt-2 text-sm flex justify-between",children:(0,o.jsxs)("span",{className:"",children:[e.orderLineItem.quantity," ",s("common:field.quantity")," "]})}),(0,o.jsx)("div",{children:null===(r=e.orderLineItem.variant.variantValues)||void 0===r?void 0:r.map((function(e,t){return(0,o.jsxs)("div",{className:"text-gray-400 text-sm",children:[e.variantTypeName,": ",e.variantValueName]},e.variantTypeId+e.variantValueId)}))})]}),(0,o.jsx)("div",{className:"col-span-6",children:(0,o.jsxs)("div",{className:"flex justify-end flex-col items-end",children:[(0,o.jsx)("span",{className:"font-light text-text-color-black mr-2 mb-2",children:s("common:selectRefundQuantity")}),(0,o.jsxs)("div",{style:{width:300},className:"relative w-full",children:[(0,o.jsx)("span",{className:"select-arrow",children:(0,o.jsx)(n.Ix0,{size:25})}),(0,o.jsxs)("select",{value:e.orderLineItem.refundQuantity||s("common:field.select"),name:"product-detail-select-variant-type",className:"product-detail-select-variant-type",onChange:function(t){e.orderLineItem.refundQuantity="-1"===t.target.value?null:parseInt(t.target.value)},children:[(0,o.jsx)("option",{value:"-1",children:s("common:field.select")}),Array.from(Array(e.orderLineItem.quantity+1).keys()).map((function(e){if(0!==e)return(0,o.jsx)("option",{value:e,children:e})}))]})]})]})})]})}))},82047:function(e,t,r){r(67294);var a=r(93562),s=r(46670),n=r(77607),c=r(85893);t.Z=(0,s.Pi)((function(e){var t=(0,n.$)().t,r={text:e.isAccountPage?t("account:orderStatuses.unfulfilled"):t("common:orderStatuses.unfulfilled"),bgColor:"#EFEDFF",color:"#6F55FF"};switch(e.status){case a.fL.UNFULFILLED:r={text:e.isAccountPage?t("account:orderStatuses.unfulfilled"):t("common:orderStatuses.unfulfilled"),bgColor:"#EFEDFF",color:"#6F55FF"};break;case a.fL.UNABLE_TO_DELIVER:r={text:e.isAccountPage?t("account:orderStatuses.unableToDeliver"):t("common:orderStatuses.unableToDeliver"),bgColor:"#E3E7EF",color:"#7E838F"};break;case a.fL.CANCELLED:r={text:e.isAccountPage?t("account:orderStatuses.canceled"):t("common:orderStatuses.canceled"),bgColor:"#FDF1F4",color:"#EF516C"};break;case a.fL.PARTIALLY_CANCELLED:r={text:e.isAccountPage?t("account:orderStatuses.partiallyCancelled"):t("common:orderStatuses.partiallyCancelled"),bgColor:"#FDF1F4",color:"#EF516C"};break;case a.fL.CANCEL_REJECTED:r={text:e.isAccountPage?t("account:orderStatuses.cancelRejected"):t("common:orderStatuses.cancelRejected"),bgColor:"#FDF1F4",color:"#EF516C"};break;case a.fL.REFUND_REJECTED:r={text:e.isAccountPage?t("account:orderStatuses.refundRejected"):t("common:orderStatuses.refundRejected"),bgColor:"#FDF2FA",color:"#E05BB1"};break;case a.fL.REFUND_REQUESTED:r={text:e.isAccountPage?t("account:orderStatuses.refundRequested"):t("common:orderStatuses.refundRequested"),bgColor:"#FDF2FA",color:"#E05BB1"};break;case a.fL.CANCEL_REQUESTED:r={text:e.isAccountPage?t("account:orderStatuses.cancelRequested"):t("common:orderStatuses.cancelRequested"),bgColor:"#FDF1F4",color:"#EF516C"};break;case a.fL.PARTIALLY_FULFILLED:r={text:e.isAccountPage?t("account:orderStatuses.partiallyFulFilled"):t("common:orderStatuses.partiallyFulFilled"),bgColor:"#E7FAEE",color:"#2BBF66"};break;case a.fL.READY_FOR_SHIPMENT:r={text:e.isAccountPage?t("account:orderStatuses.readyForShipment"):t("common:orderStatuses.readyForShipment"),bgColor:"#E7F8FF",color:"#2A9EF2"};break;case a.fL.FULFILLED:r={text:e.isAccountPage?t("account:orderStatuses.fulFilled"):t("common:orderStatuses.fulFilled"),bgColor:"#E7FAEE",color:"#2BBF66"};break;case a.fL.DELIVERED:r={text:e.isAccountPage?t("account:orderStatuses.delivered"):t("common:orderStatuses.delivered"),bgColor:"#E7FAEE",color:"#2BBF66"};break;case a.fL.PARTIALLY_DELIVERED:r={text:e.isAccountPage?t("account:orderStatuses.partiallyDelivered"):t("common:orderStatuses.partiallyDelivered"),bgColor:"#E7FAEE",color:"#2BBF66"};break;case a.fL.REFUNDED:r={text:e.isAccountPage?t("account:orderStatuses.refunded"):t("common:orderStatuses.refunded"),bgColor:"#FDF2FA",color:"#E05BB1"};break;case a.fL.REFUND_REQUEST_ACCEPTED:r={text:e.isAccountPage?t("account:orderStatuses.refundRequestAccepted"):t("common:orderStatuses.refundRequestAccepted"),bgColor:"#FDF2FA",color:"#E05BB1"};break;case a.fL.PARTIALLY_REFUNDED:r={text:e.isAccountPage?t("account:orderStatuses.partiallyRefunded"):t("common:orderStatuses.partiallyRefunded"),bgColor:"#FDF2FA",color:"#E05BB1"};break;case a.fL.READY_FOR_PICK_UP:r={text:e.isAccountPage?t("account:orderStatuses.readyForPickUp"):t("common:orderStatuses.readyForPickUp"),bgColor:"#FEF8F1",color:"#F1A63F"};break;case a.fL.PARTIALLY_READY_FOR_SHIPMENT:r={text:e.isAccountPage?t("account:orderStatuses.partiallyReadyForShipment"):t("common:orderStatuses.partiallyReadyForShipment"),bgColor:"#FEF8F1",color:"#F1A63F"}}return(0,c.jsxs)("div",{className:" font-normal  text-sm flex items-center",children:[(0,c.jsxs)("span",{style:e.pageTextColor?{color:e.pageTextColor}:{},className:"text-gray-600 mr-1",children:[" ",e.isAccountPage?t("account:orderStatus"):t("common:orderStatus"),":"]}),(0,c.jsx)("span",{style:{backgroundColor:r.bgColor,color:r.color},className:"font-normal status-tag",children:r.text})]})}))},97200:function(e,t,r){r.d(t,{Z:function(){return o}});var a=r(16835),s=r(67294),n=r(30080),c=r(85893);function o(e){var t=s.useState(!0),r=(0,a.Z)(t,2),o=r[0],l=r[1],i=function(){l(!1),e.onClose&&e.onClose()};return o?(0,c.jsxs)("div",{className:["relative w-full p-4 pr-5 mb-6","border rounded","".concat("error"===e.status?"bg-red-50  border-red text-red-600 border-red-100":""),"".concat("success"===e.status?" bg-green-50  border-green text-green-600 border-green-100":""),"".concat("info"===e.status?"bg-blue-50  border-blue text-blue-600 border-blue-100":"","\n        ").concat("warning"===e.status?"bg-yellow-50  border-blue text-yellow-600 border-yellow-100":"","\n        ")].join(" "),children:[e.title&&(0,c.jsx)("div",{className:"mb-1 text-base font-medium",children:e.title}),e.richText?(0,c.jsx)("div",{className:"font-light text-sm unreset unreset-reset",dangerouslySetInnerHTML:{__html:e.richText}}):(0,c.jsx)("div",{className:"font-light text-sm",children:e.text}),!1===e.closable&&(0,c.jsx)("span",{className:"absolute top-2 right-2 cursor-pointer leading-none",tabIndex:0,onClick:i,onKeyPress:i,children:(0,c.jsx)(n.FU5,{color:"#000"})})]}):null}},45578:function(e,t,r){r(67294);var a=r(46670),s=r(85893);t.Z=(0,a.Pi)((function(e){var t=e.text,r=e.loadingText,a=e.isLoading,n=e.className,c=e.onClick,o=e.style;return(0,s.jsx)("button",{type:"button",style:o,className:"btn relative w-full outline-none focus:outline-none ".concat(n||""," ").concat(a?"pointer-events-none bg-gray-300 text-gray-500":""),onClick:c,children:(0,s.jsx)("div",{children:(0,s.jsx)("span",{children:a&&r||t})})})}))},68660:function(e,t,r){r(67294);var a=r(46670),s=r(85893);t.Z=(0,a.Pi)((function(e){var t=e.label,r=e.errorText,a=e.status,n=e.className,c=e.children,o=e.required,l=e.hasError,i=e.style;return(0,s.jsxs)("div",{className:"mb-2 sm:mb-4 md:mb-4 "+n,children:[(0,s.jsxs)("div",{style:i,className:"mb-1 text-gray-500 text-sm font-medium",children:[o&&(0,s.jsx)("span",{className:"text-red-600",children:"* "}),t]}),c,("error"===a||!!l)&&(0,s.jsx)("div",{className:"text-xs mt-2 text-red-600",children:r})]})}))},47310:function(e,t,r){r.d(t,{A:function(){return F}});var a=r(50029),s=r(16835),n=r(87794),c=r.n(n),o=r(67294),l=r(46670),i=r(55149),u=r(31988),d=r(13955),m=r(9522),x=r(80100),f=r(37120),v=function(e,t){return e.localeCompare(t)},g=function(){var e=x.Y.getCurrentLocale();return["de","el","en","es","fi","fr","it","nb","pl","pt-BR","pt","ru","sv","tr","ua","vi"].some((function(t){return t===e}))||(e="en"),"https://cdn.myikas.com/sf/static/locale/country/".concat(e,".json")},p=function(){var e=(0,a.Z)(c().mark((function e(){var t,r,a;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=g(),e.next=3,fetch(t);case 3:return r=e.sent,e.next=6,r.json();case 6:return a=e.sent,e.abrupt("return",(0,f.o)().map((function(e){return{value:e,label:a[e]}})).sort((function(e,t){return v(e.label,t.label)})));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),E=p,h=r(30080),b=r(85893),F=(0,l.Pi)((function(e){var t=e.defaultCountry,r=e.disabled,n=void 0!==r&&r,l=e.placeholder,f=e.value,v=e.onChange,g=e.pattern,p=e.id,F=e.errorMessage,j=o.useState([]),N=(0,s.Z)(j,2),S=N[0],y=N[1],L=o.useState(t||"TR"),C=(0,s.Z)(L,2),R=C[0],A=C[1],D=o.useState(""),I=(0,s.Z)(D,2),k=I[0],P=I[1];o.useEffect((function(){T();var e=t||"TR";if(f){var r=(0,i._)(f);r&&r.country&&(e=r.country),P((0,u.f)(f,e))}else _(e);A(e)}),[t]);var T=function(){var e=(0,a.Z)(c().mark((function e(){var t;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,E();case 2:t=e.sent,y(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_=function(e){var t=(0,m.G)(e);P("+".concat(t))},U=function(e){return(0,u.f)(e,R)};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"relative flex select-flag-main",children:[(0,b.jsx)("div",{className:"flex",children:(0,b.jsxs)("div",{className:"flex relative",children:[(0,b.jsx)("div",{className:"flex items-center",children:x.Y.getIsEditor()?(0,b.jsx)("div",{className:"w-10 h-5 border mr-1"}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("img",{className:"select-flag-img",alt:R,src:"https://cdn.myikas.com/sf/assets/flags/3x2/".concat(R,".svg")}),(0,b.jsx)("div",{className:"",children:(0,b.jsx)(h.x3N,{})})]})}),(0,b.jsx)("select",{className:"select-flag",value:R,onChange:function(e){if(e.target.value){var t=e.target.value;A(t),_(t)}},disabled:n,children:S.map((function(e){return(0,b.jsx)("option",{value:e.value,"aria-label":e.label,children:e.label},e.value)}))})]})}),(0,b.jsx)("input",{className:"flag-input text-sm font-medium",value:x.Y.getIsEditor()?void 0:k,onChange:function(e){var t=U(e.target.value);P(t),v(t?(0,d.Z)(t):e.target.value)},placeholder:l,disabled:n,pattern:g,id:p})]}),!!F&&(0,b.jsx)("span",{className:"flex mt-1 text-red-600 text-xs",children:F})]})}))},24299:function(e,t,r){var a=r(16835),s=r(67294),n=r(46670),c=r(78633),o=r(85893);t.Z=(0,n.Pi)((function(e){var t=e.value,r=(e.secure,e.autocomplete),n=e.onChange,l=e.onEnter,i=e.placeHolder,u=e.disabled,d=e.type,m=e.style,x=e.name,f=s.useState(!1),v=(0,a.Z)(f,2),g=v[0],p=v[1];return(0,o.jsxs)("div",{className:"relative",children:[(0,o.jsx)("input",{className:"text-sm font-medium",type:g?"text":d,value:t,disabled:u,placeholder:""!==i?i:"",autoComplete:r,onChange:function(e){n("number"===d?parseInt(e.target.value):e.target.value)},onKeyPress:function(e){"Enter"===e.key&&l&&l()},style:m,name:x}),"password"===d&&(0,o.jsx)("span",{onClick:function(){return p(!g)},className:"absolute right-1 cursor-pointer top-2/4",style:{transform:"translateY(-50%)"},children:g?(0,o.jsx)(c.cqT,{color:"#cfcfcf"}):(0,o.jsx)(c.rnh,{color:"#cfcfcf"})})]})}))}}]);