(window.webpackJsonpvtexventures_livestreaming_free_0_37_0=window.webpackJsonpvtexventures_livestreaming_free_0_37_0||[]).push([[1],{119:function(e,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ProductsByIdentifier"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"values"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},directives:[]}],directives:[{kind:"Directive",name:{kind:"Name",value:"context"},arguments:[{kind:"Argument",name:{kind:"Name",value:"sender"},value:{kind:"StringValue",value:"vtexventures.livestreaming-free@0.37.0",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"productsByIdentifier"},name:{kind:"Name",value:"getProductsByIds"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ids"},value:{kind:"Variable",name:{kind:"Name",value:"values"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"runtimeMeta"},arguments:[{kind:"Argument",name:{kind:"Name",value:"hash"},value:{kind:"StringValue",value:"e52d349e0390fdf83142a318364a9875ed831aaa1f6fd7081e20a0ed194afaff",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"productName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"brand"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"brandId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"brandImageUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"linkText"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"link"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productReference"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productReferenceCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categoryId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productTitle"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"metaTagDescription"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"releaseDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"specificationGroups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"originalName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"specifications"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"originalName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"values"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"skuSpecifications"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isActive"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"originalName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"values"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"originalName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"items"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"itemId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ean"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"variations"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"values"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"referenceId"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"Key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"Value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"images"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"imageId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageLabel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageTag"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageText"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"sellers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sellerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sellerName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"addToCartLink"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sellerDefault"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"commertialOffer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"AvailableQuantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"Price"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ListPrice"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"Tax"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"taxPercentage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"IsAvailable"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:1606}};i.loc.source={body:'query ProductsByIdentifier($values: [ID!]) @context(sender: "vtexventures.livestreaming-free@0.37.0") {\n productsByIdentifier: getProductsByIds(ids: $values) @runtimeMeta(hash: "e52d349e0390fdf83142a318364a9875ed831aaa1f6fd7081e20a0ed194afaff") {\n productName\n brand\n brandId\n brandImageUrl\n linkText\n link\n description\n categories\n productReference\n productReferenceCode\n categoryId\n productTitle\n metaTagDescription\n releaseDate\n specificationGroups {\n name\n originalName\n specifications {\n name\n originalName\n values\n __typename\n }\n __typename\n }\n skuSpecifications {\n field {\n id\n name\n isActive\n position\n type\n originalName\n __typename\n }\n values {\n id\n name\n originalName\n position\n __typename\n }\n __typename\n }\n items {\n itemId\n name\n ean\n variations {\n name\n values\n __typename\n }\n referenceId {\n Key\n Value\n __typename\n }\n images {\n imageId\n imageLabel\n imageTag\n imageUrl\n imageText\n __typename\n }\n sellers {\n sellerId\n sellerName\n addToCartLink\n sellerDefault\n commertialOffer {\n AvailableQuantity\n Price\n ListPrice\n Tax\n taxPercentage\n IsAvailable\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function t(e,n){for(var i=0;i0;){var c=s;s=new Set,c.forEach((function(e){d.has(e)||(d.add(e),(a[e]||new Set).forEach((function(e){s.add(e)})))}))}return d.forEach((function(n){var a=t(e,n);a&&i.definitions.push(a)})),i}(i,"ProductsByIdentifier")},120:function(e,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchProductsByName"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"search"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[{kind:"Directive",name:{kind:"Name",value:"context"},arguments:[{kind:"Argument",name:{kind:"Name",value:"sender"},value:{kind:"StringValue",value:"vtexventures.livestreaming-free@0.37.0",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"products"},name:{kind:"Name",value:"getProductByName"},arguments:[{kind:"Argument",name:{kind:"Name",value:"productName"},value:{kind:"Variable",name:{kind:"Name",value:"search"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"runtimeMeta"},arguments:[{kind:"Argument",name:{kind:"Name",value:"hash"},value:{kind:"StringValue",value:"5234827db694f8127c5746c23124731453c090ed7cbe1b549ab48f81c95eaabc",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"productId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"brand"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"link"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"items"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"itemId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"images"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"sellers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sellerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sellerName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"addToCartLink"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sellerDefault"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"commertialOffer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"AvailableQuantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"Price"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ListPrice"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"Tax"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"taxPercentage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"IsAvailable"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"skuSpecifications"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isActive"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"values"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:980}};i.loc.source={body:'query SearchProductsByName($search: String!) @context(sender: "vtexventures.livestreaming-free@0.37.0") {\n products: getProductByName(productName: $search) @runtimeMeta(hash: "5234827db694f8127c5746c23124731453c090ed7cbe1b549ab48f81c95eaabc") {\n productId\n productName\n brand\n link\n items {\n itemId\n name\n images {\n imageUrl\n __typename\n }\n sellers {\n sellerId\n sellerName\n addToCartLink\n sellerDefault\n commertialOffer {\n AvailableQuantity\n Price\n ListPrice\n Tax\n taxPercentage\n IsAvailable\n __typename\n }\n __typename\n }\n __typename\n }\n skuSpecifications {\n field {\n id\n name\n isActive\n position\n type\n __typename\n }\n values {\n id\n name\n position\n __typename\n }\n __typename\n }\n __typename\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function t(e,n){for(var i=0;i0;){var c=s;s=new Set,c.forEach((function(e){d.has(e)||(d.add(e),(a[e]||new Set).forEach((function(e){s.add(e)})))}))}return d.forEach((function(n){var a=t(e,n);a&&i.definitions.push(a)})),i}(i,"SearchProductsByName")},15:function(e,n,i){"use strict";i.d(n,"a",(function(){return t.b})),i.d(n,"g",(function(){return c})),i.d(n,"i",(function(){return h})),i.d(n,"f",(function(){return N.b})),i.d(n,"j",(function(){return C})),i.d(n,"c",(function(){return F})),i.d(n,"e",(function(){return A})),i.d(n,"b",(function(){return D})),i.d(n,"d",(function(){return V})),i.d(n,"h",(function(){return q}));var a=i(0),t=(i(82),i(83),i(84)),r=i(2),d=i(8),s=i(32),c=function(){var e="store"===Object(d.useRuntime)().route.domain,n=Object(a.useState)("loading"),i=Object(r.a)(n,2),t=i[0],c=i[1];return Object(a.useEffect)((function(){var n=s.a.nzRuntimeScript,i=document.getElementById("nz-runtime-script")||document.querySelector('script[src="'.concat(n,'"]')),a=function(){var e=!0,n=setInterval((function(){var i;(null===(i=null===window||void 0===window?void 0:window.nizza)||void 0===i?void 0:i.core)&&(clearInterval(n),e=!1,c("loaded"),console.log("✅ Successfully loaded Nizza runtime."))}),100);setTimeout((function(){clearInterval(n),e&&(c("error"),console.error("❌ Failed to load Nizza runtime within the expected time."))}),6e4)},t=function(){c("error"),r.remove(),console.error("❌ Failed to load Nizza runtime.")};if(!e&&!i){var r=document.createElement("script");return r.id="nz-runtime-script",r.src=n,r.type="module",r.async=!0,r.addEventListener("load",a),r.addEventListener("error",t),document.head.appendChild(r),console.log("🤖 Adding Nizza runtime script to the header."),function(){r.removeEventListener("load",a),r.removeEventListener("error",t)}}a()}),[]),t},l=i(3),o=i.n(l),u=i(5),m=i(74),v=i.n(m),g=i(28),f=i.n(g),k=i(88),p=i(89),b=function(){function e(){Object(k.a)(this,e)}return Object(p.a)(e,null,[{key:"instance",value:function(n){var i,a,t=v()(n);return!e.scripts.has(t)&&(null===(i=null===window||void 0===window?void 0:window.nizza)||void 0===i?void 0:i.utils)&&e.scripts.set(t,new window.nizza.utils.VtexIoScriptInjector(Object.assign(Object.assign({},n),{globalId:"nizza",module:!0}))),null!==(a=e.scripts.get(t))&&void 0!==a?a:null}},{key:"reset",value:function(n){var i=v()(n);e.scripts.has(i)&&e.scripts.delete(i)}}]),e}();b.scripts=new Map;var S=function(e,n){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&n.indexOf(a)<0&&(i[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(a=Object.getOwnPropertySymbols(e);t0?this.queue.shift():null}},{key:"size",value:function(){return this.queue.length}},{key:"isEmpty",value:function(){return 0===this.queue.length}},{key:"print",value:function(){return this.queue}}]),e}(),z=i(198),F=function(){var e,n,i=(e="FINGERPRINT_LIVE_SHOPPING",(n=document.cookie.match(new RegExp("".concat(e,"=([^;]+)"))))?n[1]:void 0);return i||(function(e,n,i){var a=i.days,t="";if(a){var r=new Date;r.setTime(r.getTime()+24*a*60*60*1e3),t="; expires=".concat(r.toUTCString())}document.cookie="".concat(e,"=").concat(n||"").concat(t,"; path=/")}("FINGERPRINT_LIVE_SHOPPING",i=Object(z.a)(),{days:1}),i)},C=function(e,n){var i=Object(a.useState)(),t=Object(r.a)(i,2),d=t[0],s=t[1],c=Object(a.useState)([]),l=Object(r.a)(c,2),m=l[0],v=l[1],g=Object(a.useState)([]),f=Object(r.a)(g,2),k=f[0],p=f[1],b=Object(a.useState)([]),S=Object(r.a)(b,2),h=S[0],N=S[1],j=Object(a.useState)(),y=Object(r.a)(j,2),_=y[0],z=y[1],C=Object(a.useState)(void 0),A=Object(r.a)(C,2),x=A[0],P=A[1],L=Object(a.useState)(void 0),D=Object(r.a)(L,2),V=D[0],R=D[1],M=Object(a.useState)(!1),H=Object(r.a)(M,2),q=H[0],G=H[1],U=Object(a.useState)(void 0),B=Object(r.a)(U,2),K=B[0],Q=B[1],Z=E()(),W=Z.loading,J=Z.error,Y=null==Z?void 0:Z.session,$=Object(a.useState)(!1),X=Object(r.a)($,2),ee=X[0],ne=X[1],ie=Object(a.useState)(void 0),ae=Object(r.a)(ie,2),te=ae[0],re=ae[1],de=Object(a.useState)(void 0),se=Object(r.a)(de,2),ce=se[0],le=se[1],oe=Object(a.useState)(void 0),ue=Object(r.a)(oe,2),me=ue[0],ve=ue[1],ge=Object(a.useState)(),fe=Object(r.a)(ge,2),ke=fe[0],pe=fe[1],be=Object(a.useState)(!1),Se=Object(r.a)(be,2),he=Se[0],Ne=Se[1],Oe=w({rootMargin:"-200px 0px"}).livestreaminComponentInView,je=Object(a.useMemo)((function(){var e,n,i,a,t,r,d,s,c,l;if(!J&&!W&&Y.id)return{id:String(Y.id),email:null!==(a=String(null===(i=null===(n=null===(e=null==Y?void 0:Y.namespaces)||void 0===e?void 0:e.profile)||void 0===n?void 0:n.email)||void 0===i?void 0:i.value))&&void 0!==a?a:"",isAuth:"true"===(null===(d=null===(r=null===(t=null==Y?void 0:Y.namespaces)||void 0===t?void 0:t.profile)||void 0===r?void 0:r.isAuthenticated)||void 0===d?void 0:d.value),account:String(null===(l=null===(c=null===(s=null==Y?void 0:Y.namespaces)||void 0===s?void 0:s.account)||void 0===c?void 0:c.accountName)||void 0===l?void 0:l.value)}}),[W,Y,J]),ye=Object(a.useMemo)((function(){var e,n,i,a,t,r;if(!J&&!W&&Y){var d=null===(i=null===(n=null===(e=null==Y?void 0:Y.namespaces)||void 0===e?void 0:e.profile)||void 0===n?void 0:n.firstName)||void 0===i?void 0:i.value,s=null===(r=null===(t=null===(a=null==Y?void 0:Y.namespaces)||void 0===a?void 0:a.profile)||void 0===t?void 0:t.lastName)||void 0===r?void 0:r.value;if(d&&s)return"".concat(d," ").concat(s)}}),[W,Y,J]),_e=Object(a.useCallback)((function(){var i;if(n){var a=new WebSocket(n);a.onopen=function(){ne(!0),i=new T,e({type:"SET_QUEUE_LIKES_SOCKET",args:{queueSocket:i}})},a.onclose=function(){ne(!1),s(void 0),_e()},a.onerror=function(){a.close()},a.onmessage=function(n){var a=JSON.parse(n.data),t=a.action,r=a.data,d=a.sendDate,s=a.username,c=a.productId,l=a.showProduct,o=a.collection,u=a.livestreamingId,m=a.backgroundWhiteHighlight,g=a.emailIsRequired,f=a.showGifButton,k=a.showCarouselChatButton,b=a.modalLive,S=a.isAdmin,h=a.sessionId,j=a.responseAdmin,y=a.type,_=a.trigger,E=a.id;switch(t){case"sendmessage":v((function(e){var n,i;return e.find((function(e){return e.id===E}))?Object(O.a)(e):[{id:E,data:r,username:s,sendDate:d,isAdmin:S,sessionId:h,responseAdmin:j,type:y,color:null!==(i=null===(n=e.find((function(e){return e.username===s})))||void 0===n?void 0:n.color)&&void 0!==i?i:I()}].concat(Object(O.a)(e))}));break;case"sendlike":if(document.hidden)break;if(i.size()<=4){var w=Date.now();p((function(e){return[].concat(Object(O.a)(e),[{id:w,color:I()}])})),i.add(w)}break;case"sendquestion":r.date=Date.now(),z(r);break;case"sendaddtocart":if(document.hidden)break;N((function(e){return[].concat(Object(O.a)(e),[{id:"",productId:"",productName:"",show:!0,image:r.imageUrl,brand:"",items:[],link:""}])}));break;case"sendhighlightproduct":e({type:"SET_HIGHLIGHTPRODUCT",args:{highlightProduct:{productId:c,showProduct:l,collection:o,livestreamingId:u,backgroundWhiteHighlight:m}}});break;case"sendshowCounter":P(r),re(g),le(b),R(f),G(k),Q(K);break;case"senddeletemessage":pe(r);break;case"sendtransmitiontype":e({type:"SET_TRANSMITION_TYPE",args:{transmitionType:r}}),ve(r);break;case"sendpinmessage":e({type:"SET_PIN_MESSAGE",args:{message:r}});break;case"sendunpinmessage":e({type:"SET_PIN_MESSAGE",args:{message:{}}});break;case"sendactivepromotion":e({type:"SET_ACTIVE_PROMO_MESSAGE",args:{trigger:_}}),setTimeout((function(){e({type:"SET_ACTIVE_PROMO_MESSAGE",args:{trigger:void 0}}),(null==_?void 0:_.isCoupon)||e({type:"SET_UPDATE_LIVESTREAMING",args:{type:"activePromotion"}})}),6e4);break;case"sendupdatelivestreaming":e({type:"SET_UPDATE_LIVESTREAMING",args:{type:""}});break;case"sendplayeralignment":e({type:"SET_PLAYER_ALIGNMENT",args:{playerAlignment:r}})}},s(a)}}),[n]),Ee=Object(a.useCallback)((function(e,n){if(ee&&je&&je.id){var i,a=""!==je.email&&void 0!==je.email&&"undefined"!==je.email||!n?je.email:n;null==d||d.send(JSON.stringify({action:"sendaccountid",data:je.id,username:null!=ye?ye:e,device:(i=navigator.userAgent||navigator.vendor,/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|mobile|CriOS/i.test(i)?"mobile":"desktop"),email:a,fingerprint:F()}))}}),[ee,d,je,ye,he]);return Object(a.useEffect)((function(){return d?function(){d.close()}:function(){}}),[d]),Object(a.useEffect)((function(){_e()}),[_e]),Object(a.useEffect)((function(){Ee&&Ee()}),[Ee]),Object(a.useEffect)((function(){setTimeout(Object(u.a)(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Oe){e.next=2;break}return e.abrupt("return");case 2:Ne(!0);case 3:case"end":return e.stop()}}),e)}))),1e4)}),[Oe]),{socket:d,chat:m,hearts:k,question:_,productsInCart:h,showCounter:x,showGif:V,user:je,emailIsRequired:te,messageToDelete:ke,setHearts:p,setChat:v,setQuestion:z,setProductsInCart:N,sendAccountId:Ee,setMessageToDelete:pe,transmitionType:me,modalLiveState:ce,showCarouselChatButton:q,showTax:K}};function I(){for(var e="#",n=0;n<6;n+=1)e+="0123456789ABCDEF"[Math.floor(16*Math.random())];return e}var A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;return Array.from({length:e},(function(){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Math.random()))})).join("")},x=function(e){var n=null==e?void 0:e.items.filter((function(e){return e.sellers.filter((function(e){return e.commertialOffer.IsAvailable})).length>0})),i=Object(r.a)(n,1)[0];i||(i=null==e?void 0:e.items[0]);var a=null==i?void 0:i.sellers.find((function(e){return!0===e.sellerDefault}));return{item:i,seller:a,isAvailable:!!(null==n?void 0:n.length)}},P=i(59),L=i.n(P),D=function(){var e=Object(u.a)(o.a.mark((function e(n,i,a,t){var r,d,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,n.query({query:L.a,variables:{collection:i,salesChannel:t}});case 4:if(r=e.sent,d=r.data,null==(s=null==d?void 0:d.products)?void 0:s.length){e.next=9;break}return e.abrupt("return",[]);case 9:return e.abrupt("return",s.map((function(e){var n,i,t,r,d,s,c,l,o=x(e),u=o.item,m=o.seller,v=o.isAvailable,g=a?(null!==(n=null==m?void 0:m.commertialOffer.Price)&&void 0!==n?n:0)+(null!==(t=null===(i=null==m?void 0:m.commertialOffer)||void 0===i?void 0:i.Tax)&&void 0!==t?t:0):null==m?void 0:m.commertialOffer.Price,f=a?(null!==(r=null==m?void 0:m.commertialOffer.ListPrice)&&void 0!==r?r:0)+(null!==(s=null===(d=null==m?void 0:m.commertialOffer)||void 0===d?void 0:d.Tax)&&void 0!==s?s:0):null==m?void 0:m.commertialOffer.ListPrice,k=null==e?void 0:e.link;try{k=new URL(e.link).pathname}catch(e){console.info("Error changing url products: ",e)}return Object.assign(Object.assign({},e),{id:e.productId,name:null==e?void 0:e.productName,priceWithDiscount:g,price:f,imageUrl:null===(c=null==u?void 0:u.images[0])||void 0===c?void 0:c.imageUrl,addToCartLink:null==m?void 0:m.addToCartLink,isAvailable:v,variationSelector:null!==(l=null==e?void 0:e.skuSpecifications)&&void 0!==l?l:[],pdpLink:k,skuId:u.itemId})})));case 10:case"end":return e.stop()}}),e)})));return function(n,i,a,t){return e.apply(this,arguments)}}(),V=(i(119),function(){var e=Object(u.a)(o.a.mark((function e(n,i,a){var t,r,d,s,c,l,u,m,v,g,f,k,p,b,S,h,N,O,j,y,_,E,w,T;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S="/api/catalog_system/pub/products/search?fq=productId:".concat(n),a&&(S+="&sc=".concat(a)),e.next=4,fetch(S);case 4:return h=e.sent,e.next=7,h.json();case 7:if(null==(N=e.sent)?void 0:N.length){e.next=10;break}return e.abrupt("return",null);case 10:O=x(N[0]),j=O.item,y=O.seller,_=O.isAvailable,E=i?(null!==(r=null==y?void 0:y.commertialOffer.Price)&&void 0!==r?r:0)+(null!==(s=null===(d=null==y?void 0:y.commertialOffer)||void 0===d?void 0:d.Tax)&&void 0!==s?s:0):null!==(t=null==y?void 0:y.commertialOffer.Price)&&void 0!==t?t:0,w=i?(null!==(l=null==y?void 0:y.commertialOffer.ListPrice)&&void 0!==l?l:0)+(null!==(m=null===(u=null==y?void 0:y.commertialOffer)||void 0===u?void 0:u.Tax)&&void 0!==m?m:0):null!==(c=null==y?void 0:y.commertialOffer.ListPrice)&&void 0!==c?c:0,T=null===(v=N[0])||void 0===v?void 0:v.link;try{T=new URL(N[0].link).pathname}catch(e){console.info("Error changing url products: ",e)}return e.abrupt("return",Object.assign(Object.assign({},N[0]),{id:null===(g=N[0])||void 0===g?void 0:g.productId,name:null===(f=N[0])||void 0===f?void 0:f.productName,priceWithDiscount:E,price:w,imageUrl:null===(k=null==j?void 0:j.images[0])||void 0===k?void 0:k.imageUrl,addToCartLink:null!==(p=null==y?void 0:y.addToCartLink)&&void 0!==p?p:"",isAvailable:_,variationSelector:null===(b=N[0])||void 0===b?void 0:b.skuSpecifications,pdpLink:T,skuId:j.itemId}));case 17:case"end":return e.stop()}}),e)})));return function(n,i,a){return e.apply(this,arguments)}}()),R=(i(120),{id:"",account:"",eventName:"",utm:"",collection:void 0,quickView:void 0,socket:void 0,chat:void 0,question:void 0,highlightProduct:void 0,showCounterClient:void 0,showGifClient:void 0,emailIsRequiredClient:void 0,modalLive:void 0,ivsRealTime:void 0,status:void 0,loadingRender:{products:!0,chat:!0,config:!0},transmitionType:void 0,reloadingApp:!1,pinMessage:{data:void 0},openInModal:!0,showChatCarousel:void 0,showChatCarouselClient:void 0,promotionTrigger:void 0,globalPlayer:{player:void 0,replay:0},updateLiveSteamingKey:Object(z.a)(),playerAlignment:"center",showChatLocal:!0}),M=function(e,n){var i,a,t,r,d,s;switch(n.type){case"SET_PRODUCTS":var c=n.args||[];return Object.assign(Object.assign({},e),{collection:Object.assign(Object.assign({},e.collection),{products:c.products}),loadingRender:Object.assign(Object.assign({},e.loadingRender),{products:!1})});case"SET_CHAT":var l=n.args||[];return Object.assign(Object.assign({},e),{chats:l.chats,loadingRender:Object.assign(Object.assign({},e.loadingRender),{chat:!1})});case"SET_LIVESTREAM_CONFIG":var o=n.args||{};return Object.assign(Object.assign({},e),{id:null===(i=o.livestreaming)||void 0===i?void 0:i.id,eventName:null===(a=o.livestreaming)||void 0===a?void 0:a.eventName,utm:null===(t=o.livestreaming)||void 0===t?void 0:t.utm,collection:null===(r=o.livestreaming)||void 0===r?void 0:r.collection,quickView:null===(d=o.livestreaming)||void 0===d?void 0:d.quickView,config:null===(s=o.livestreaming)||void 0===s?void 0:s.config,loadingRender:Object.assign(Object.assign({},e.loadingRender),{config:!1})});case"SET_LIKE":var u=n.args||{};return Object.assign(Object.assign({},e),{likes:u.likes});case"SET_VIEWERS":var m=n.args||{};return Object.assign(Object.assign({},e),{viewers:m.viewers});case"SET_IVS_DATA_REAL_TIME":var v=n.args||{};return Object.assign(Object.assign({},e),{ivsRealTime:v.ivsRealTime});case"SET_HIGHLIGHTPRODUCT":var g=n.args||{};return Object.assign(Object.assign({},e),{highlightProduct:g.highlightProduct});case"SET_COUNTER":var f=n.args||{};return Object.assign(Object.assign({},e),{showCounterClient:f.showCounter,emailIsRequiredClient:f.emailIsRequired,modalLive:f.modalLive,showGifClient:f.showGif,showChatCarouselClient:f.showCarouselChat});case"SET_STATUS_EVENT":var k=n.args||{};return Object.assign(Object.assign({},e),{status:k.status});case"SET_QUEUE_LIKES_SOCKET":var p=n.args||{};return Object.assign(Object.assign({},e),{queueSocket:p.queueSocket});case"SET_TRANSMITION_TYPE":var b=n.args||{};return Object.assign(Object.assign({},e),{transmitionType:b.transmitionType});case"SET_RELOADING_APP":var S=n.args||{};return Object.assign(Object.assign({},e),{reloadingApp:S.reloadingApp});case"SET_PIN_MESSAGE":var h=n.args||{};return Object.assign(Object.assign({},e),{pinMessage:h.message});case"SET_ACTIVE_PROMO_MESSAGE":var N=n.args||{};return Object.assign(Object.assign({},e),{promotionTrigger:N.trigger});case"SET_CLOSE_MODAL":return Object.assign(Object.assign({},e),{openInModal:!1});case"TOGGLE_CHAT_CAROUSEL":return Object.assign(Object.assign({},e),{showChatCarousel:!e.showChatCarousel});case"SET_PROMOTION_TRIGGERS":var O=n.args||[];return Object.assign(Object.assign({},e),{triggers:O.triggers});case"SET_GLOBAL_PLAYER":var j=n.args||[];return Object.assign(Object.assign({},e),{globalPlayer:j.globalPlayer});case"SET_UPDATE_LIVESTREAMING":var y=n.args||{};return Object.assign(Object.assign({},e),{updateLiveSteamingKey:"".concat(Object(z.a)(),"---").concat(y.type)});case"SET_PLAYER_ALIGNMENT":var _=n.args||{};return Object.assign(Object.assign({},e),{playerAlignment:_.playerAlignment});case"SET_SHOW_CHAT_LOCAL":var E=n.args||{};return Object.assign(Object.assign({},e),{showChatLocal:E.showChatLocal});default:return e}};function H(){return Object.assign({},R)}var q=function(){return Object(a.useReducer)(M,{},H)}},32:function(e,n,i){"use strict";i.d(n,"a",(function(){return b}));var a,t,r,d,s,c,l,o,u=i(2),m={nzCDN:"https://cdn.nizza.com",nzRuntimeScript:"{{nzCDN}}/runtime-script/dev/nz-rs-index.js",nzPlayerScript:"{{nzCDN}}/player-script/dev/nz-ps-index.js",nzSSVScript:"{{nzCDN}}/ssv-script/dev/nz-ssv-index.js",nzSSVAdminScript:"{{nzCDN}}/ssv-admin/dev/nz-ssva-index.js",nzAdminChatScript:"{{nzCDN}}/admin-chat/dev/nz-ac-index.js",nzAdminHighlightProductScript:"{{nzCDN}}/admin-highlight-product/dev/nz-ahp-index.js"},v={},g={nzCDN:"https://cdn.nizza.com",nzRuntimeScript:"{{nzCDN}}/runtime-script/main-dev/nz-rs-index.js",nzPlayerScript:"{{nzCDN}}/player-script/main-dev/nz-ps-index.js",nzSSVScript:"{{nzCDN}}/ssv-script/main-dev/nz-ssv-index.js",nzSSVAdminScript:"{{nzCDN}}/ssv-admin/main-dev/nz-ssva-index.js",nzAdminChatScript:"{{nzCDN}}/admin-chat/main-dev/nz-ac-index.js",nzAdminHighlightProductScript:"{{nzCDN}}/admin-highlight-product/main-dev/nz-ahp-index.js"},f={nzCDN:"https://cdn.nizza.com",nzRuntimeScript:"{{nzCDN}}/runtime-script/prod/nz-rs-index.js",nzPlayerScript:"{{nzCDN}}/player-script/prod/nz-ps-index.js",nzSSVScript:"{{nzCDN}}/ssv-script/prod/nz-ssv-index.js",nzSSVAdminScript:"{{nzCDN}}/ssv-admin/prod/nz-ssva-index.js",nzAdminChatScript:"{{nzCDN}}/admin-chat/prod/nz-ac-index.js",nzAdminHighlightProductScript:"{{nzCDN}}/admin-highlight-product/prod/nz-ahp-index.js"},k={nzCDN:"https://cdn.nizza.com",nzRuntimeScript:"{{nzCDN}}/runtime-script/staging/nz-rs-index.js",nzPlayerScript:"{{nzCDN}}/player-script/staging/nz-ps-index.js",nzSSVScript:"{{nzCDN}}/ssv-script/staging/nz-ssv-index.js",nzSSVAdminScript:"{{nzCDN}}/ssv-admin/staging/nz-ssva-index.js",nzAdminChatScript:"{{nzCDN}}/admin-chat/staging/nz-ac-index.js",nzAdminHighlightProductScript:"{{nzCDN}}/admin-highlight-product/staging/nz-ahp-index.js"},p=function(e,n){return e.replace(/\{\{(.*?)\}\}/g,(function(e,i){return n[i.trim()]||""}))},b=(c=null===(a=null===window||void 0===window?void 0:window.__RUNTIME__)||void 0===a?void 0:a.account,l=null===(t=null===window||void 0===window?void 0:window.__RUNTIME__)||void 0===t?void 0:t.workspace,o=null===(r=null===window||void 0===window?void 0:window.__RUNTIME__)||void 0===r?void 0:r.production,function(e){for(var n=Object.assign({},e),i=0,a=Object.entries(e);i