(window.webpackJsonpvtexventures_livestreaming_free_0_37_0=window.webpackJsonpvtexventures_livestreaming_free_0_37_0||[]).push([[2],{198:function(e,t,n){"use strict";var r,o=new Uint8Array(16);function i(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)}var u=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var s=function(e){return"string"==typeof e&&u.test(e)},a=[],f=0;f<256;++f)a.push((f+256).toString(16).substr(1));var l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n};t.a=function(e,t,n){var r=(e=e||{}).random||(e.rng||i)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return l(r)}},74:function(e,t,n){e.exports=function e(t,n,r){function o(u,s){if(!n[u]){if(!t[u]){if(i)return i(u,!0);throw new Error("Cannot find module '"+u+"'")}s=n[u]={exports:{}},t[u][0].call(s.exports,(function(e){return o(t[u][1][e]||e)}),s,s.exports,e,t,n,r)}return n[u].exports}for(var i=!1,u=0;u>16),a((65280&r)>>8),a(255&r);return 2==o?a(255&(r=f(e.charAt(n))<<2|f(e.charAt(n+1))>>4)):1==o&&(a((r=f(e.charAt(n))<<10|f(e.charAt(n+1))<<4|f(e.charAt(n+2))>>2)>>8&255),a(255&r)),i},e.fromByteArray=function(e){var t,n,r,o,i=e.length%3,u="";function s(e){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)}for(t=0,r=e.length-i;t>18&63)+s(o>>12&63)+s(o>>6&63)+s(63&o);switch(i){case 1:u=(u+=s((n=e[e.length-1])>>2))+s(n<<4&63)+"==";break;case 2:u=(u=(u+=s((n=(e[e.length-2]<<8)+e[e.length-1])>>10))+s(n>>4&63))+s(n<<2&63)+"="}return u}}(void 0===n?this.base64js={}:n)}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(e,t,n){(function(t,r,o,i,u,s,a,f,l){var c=e("base64-js"),d=e("ieee754");function o(e,t,n){if(!(this instanceof o))return new o(e,t,n);var r,i,u,s,a=typeof e;if("base64"===t&&"string"==a)for(e=(s=e).trim?s.trim():s.replace(/^\s+|\s+$/g,"");e.length%4!=0;)e+="=";if("number"==a)r=U(e);else if("string"==a)r=o.byteLength(e,t);else{if("object"!=a)throw new Error("First argument needs to be a number, array or string.");r=U(e.length)}if(o._useTypedArrays?i=o._augment(new Uint8Array(r)):((i=this).length=r,i._isBuffer=!0),o._useTypedArrays&&"number"==typeof e.byteLength)i._set(e);else if(x(s=e)||o.isBuffer(s)||s&&"object"==typeof s&&"number"==typeof s.length)for(u=0;u>>0)):(t+1>>0),o}function g(e,t,n,r){if(r||(F("boolean"==typeof n,"missing or invalid endian"),F(null!=t,"missing offset"),F(t+1>>8*(r?i:1-i)}function v(e,t,n,r,o){if(o||(F(null!=t,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(null!=n,"missing offset"),F(n+3>>8*(r?i:3-i)&255}function _(e,t,n,r,o){o||(F(null!=t,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(null!=n,"missing offset"),F(n+1>8,n%=256,r.push(n),r.push(t);return r}(t),e,n,r)}(this,e,t,n);break;default:throw new Error("Unknown encoding")}return i},o.prototype.toString=function(e,t,n){var r,o,i,u,s=this;if(e=String(e||"utf8").toLowerCase(),t=Number(t)||0,(n=void 0!==n?Number(n):s.length)===t)return"";switch(e){case"hex":r=function(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||rthis.length&&(r=this.length);var i=(r=e.length-t=this.length))return this[e]},o.prototype.readUInt16LE=function(e,t){return h(this,e,!0,t)},o.prototype.readUInt16BE=function(e,t){return h(this,e,!1,t)},o.prototype.readUInt32LE=function(e,t){return p(this,e,!0,t)},o.prototype.readUInt32BE=function(e,t){return p(this,e,!1,t)},o.prototype.readInt8=function(e,t){if(t||(F(null!=e,"missing offset"),F(e=this.length))return 128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){return g(this,e,!0,t)},o.prototype.readInt16BE=function(e,t){return g(this,e,!1,t)},o.prototype.readInt32LE=function(e,t){return y(this,e,!0,t)},o.prototype.readInt32BE=function(e,t){return y(this,e,!1,t)},o.prototype.readFloatLE=function(e,t){return w(this,e,!0,t)},o.prototype.readFloatBE=function(e,t){return w(this,e,!1,t)},o.prototype.readDoubleLE=function(e,t){return b(this,e,!0,t)},o.prototype.readDoubleBE=function(e,t){return b(this,e,!1,t)},o.prototype.writeUInt8=function(e,t,n){n||(F(null!=e,"missing value"),F(null!=t,"missing offset"),F(t=this.length||(this[t]=e)},o.prototype.writeUInt16LE=function(e,t,n){m(this,e,t,!0,n)},o.prototype.writeUInt16BE=function(e,t,n){m(this,e,t,!1,n)},o.prototype.writeUInt32LE=function(e,t,n){v(this,e,t,!0,n)},o.prototype.writeUInt32BE=function(e,t,n){v(this,e,t,!1,n)},o.prototype.writeInt8=function(e,t,n){n||(F(null!=e,"missing value"),F(null!=t,"missing offset"),F(t=this.length||(0<=e?this.writeUInt8(e,t,n):this.writeUInt8(255+e+1,t,n))},o.prototype.writeInt16LE=function(e,t,n){_(this,e,t,!0,n)},o.prototype.writeInt16BE=function(e,t,n){_(this,e,t,!1,n)},o.prototype.writeInt32LE=function(e,t,n){E(this,e,t,!0,n)},o.prototype.writeInt32BE=function(e,t,n){E(this,e,t,!1,n)},o.prototype.writeFloatLE=function(e,t,n){I(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){I(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){A(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){A(this,e,t,!1,n)},o.prototype.fill=function(e,t,n){if(t=t||0,n=n||this.length,F("number"==typeof(e="string"==typeof(e=e||0)?e.charCodeAt(0):e)&&!isNaN(e),"value is not a number"),F(t<=n,"end < start"),n!==t&&0!==this.length){F(0<=t&&t"},o.prototype.toArrayBuffer=function(){if("undefined"==typeof Uint8Array)throw new Error("Buffer.toArrayBuffer not supported in this browser");if(o._useTypedArrays)return new o(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;t=t.length||o>=e.length);o++)t[o+n]=e[o];return o}function T(e){try{return decodeURIComponent(e)}catch(e){return String.fromCharCode(65533)}}function M(e,t){F("number"==typeof e,"cannot write a non-number as a number"),F(0<=e,"specified a negative value for writing an unsigned value"),F(e<=t,"value is larger than maximum value for type"),F(Math.floor(e)===e,"value has a fractional component")}function N(e,t,n){F("number"==typeof e,"cannot write a non-number as a number"),F(e<=t,"value larger than maximum allowed value"),F(n<=e,"value smaller than minimum allowed value"),F(Math.floor(e)===e,"value has a fractional component")}function Y(e,t,n){F("number"==typeof e,"cannot write a non-number as a number"),F(e<=t,"value larger than maximum allowed value"),F(n<=e,"value smaller than minimum allowed value")}function F(e,t){if(!e)throw new Error(t||"Failed assertion")}o._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=B.get,e.set=B.set,e.write=B.write,e.toString=B.toString,e.toLocaleString=B.toString,e.toJSON=B.toJSON,e.copy=B.copy,e.slice=B.slice,e.readUInt8=B.readUInt8,e.readUInt16LE=B.readUInt16LE,e.readUInt16BE=B.readUInt16BE,e.readUInt32LE=B.readUInt32LE,e.readUInt32BE=B.readUInt32BE,e.readInt8=B.readInt8,e.readInt16LE=B.readInt16LE,e.readInt16BE=B.readInt16BE,e.readInt32LE=B.readInt32LE,e.readInt32BE=B.readInt32BE,e.readFloatLE=B.readFloatLE,e.readFloatBE=B.readFloatBE,e.readDoubleLE=B.readDoubleLE,e.readDoubleBE=B.readDoubleBE,e.writeUInt8=B.writeUInt8,e.writeUInt16LE=B.writeUInt16LE,e.writeUInt16BE=B.writeUInt16BE,e.writeUInt32LE=B.writeUInt32LE,e.writeUInt32BE=B.writeUInt32BE,e.writeInt8=B.writeInt8,e.writeInt16LE=B.writeInt16LE,e.writeInt16BE=B.writeInt16BE,e.writeInt32LE=B.writeInt32LE,e.writeInt32BE=B.writeInt32BE,e.writeFloatLE=B.writeFloatLE,e.writeFloatBE=B.writeFloatBE,e.writeDoubleLE=B.writeDoubleLE,e.writeDoubleBE=B.writeDoubleBE,e.fill=B.fill,e.inspect=B.inspect,e.toArrayBuffer=B.toArrayBuffer,e}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(e,t,n){(function(n,r,o,i,u,s,a,f,l){var c=new(o=e("buffer").Buffer)(4);c.fill(0),t.exports={hash:function(e,t,n,r){for(var i=t(function(e,t){e.length%4!=0&&(n=e.length+(4-e.length%4),e=o.concat([e,c],n));for(var n,r=[],i=t?e.readInt32BE:e.readInt32LE,u=0;ug?t=e(t):t.length>5]|=128<>>9<<4)]=t;for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,u=0;u>>32-o,n)}function p(e,t,n,r,o,i,u){return h(t&n|~t&r,e,t,o,i,u)}function g(e,t,n,r,o,i,u){return h(t&r|n&~r,e,t,o,i,u)}function y(e,t,n,r,o,i,u){return h(t^n^r,e,t,o,i,u)}function w(e,t,n,r,o,i,u){return h(n^(t|~r),e,t,o,i,u)}function b(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}t.exports=function(e){return c.hash(e,d,16)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(e,t,n){(function(e,n,r,o,i,u,s,a,f){t.exports=function(e){for(var t,n=new Array(e),r=0;r>>((3&r)<<3)&255;return n}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(e,t,n){(function(n,r,o,i,u,s,a,f,l){var c=e("./helpers");function d(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var n,r,o,i=Array(80),u=1732584193,s=-271733879,a=-1732584194,f=271733878,l=-1009589776,c=0;c>16)+(t>>16)+(n>>16)<<16|65535&n}function p(e,t){return e<>>32-t}t.exports=function(e){return c.hash(e,d,20,!0)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(e,t,n){(function(n,r,o,i,u,s,a,f,l){function c(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function d(e,t){var n,r=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),o=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),i=new Array(64);e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var u,s,a=0;a>>t|e<<32-t},g=function(e,t){return e>>>t};t.exports=function(e){return h.hash(e,d,32,!0)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(e,t,n){(function(e,t,r,o,i,u,s,a,f){n.read=function(e,t,n,r,o){var i,u,s=8*o-r-1,a=(1<>1,l=-7,c=n?o-1:0,d=n?-1:1;for(o=e[t+c],c+=d,i=o&(1<<-l)-1,o>>=-l,l+=s;0>=-l,l+=r;0>1,c=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,h=r?1:-1;for(i=t<0||0===t&&1/t<0?1:0,t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,u=f):(u=Math.floor(Math.log(t)/Math.LN2),t*(r=Math.pow(2,-u))<1&&(u--,r*=2),2<=(t+=1<=u+l?c/r:c*Math.pow(2,1-l))*r&&(u++,r/=2),f<=u+l?(s=0,u=f):1<=u+l?(s=(t*r-1)*Math.pow(2,o),u+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,o),u=0));8<=o;e[n+d]=255&s,d+=h,s/=256,o-=8);for(u=u<0;){var s=m;m=new Set,s.forEach((function(e){l.has(e)||(l.add(e),(a[e]||new Set).forEach((function(e){m.add(e)})))}))}return l.forEach((function(n){var a=t(e,n);a&&i.definitions.push(a)})),i}(i,"getProductsByCollection")}}]);; (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);i0;){var d=u;u=new Set,d.forEach((function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach((function(e){u.add(e)})))}))}return o.forEach((function(n){var a=i(e,n);a&&t.definitions.push(a)})),t}(t,"updateOrderFormMarketingData")},85:function(e,n,t){"use strict";var a=t(3),i=t.n(a),r=t(5),o=t(0),u=t.n(o),d=t(13),c=t.n(d),s=t(72),l=t.n(s),m=t(54),v=t(8),f=t(100),k=t.n(f),p=t(32),b=t(15),g=t(7),w=t(154),h=t.n(w),O=function(e){var n=e.client,t=e.utm,a=e.orderFormObject,o=a.orderForm,u=a.setOrderForm,d=setTimeout(Object(r.a)(i.a.mark((function e(){var a;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:if(!(!t||t===(null===(a=null==o?void 0:o.marketingData)||void 0===a?void 0:a.utmSource))){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,n.mutate({mutation:h.a,variables:{input:{utmSource:t}}});case 7:u(Object.assign(Object.assign({},o),{marketingData:Object.assign(Object.assign({},null==o?void 0:o.marketingData),{utmSource:t})}));case 8:case"end":return e.stop()}}),e)}))),1e4);return function(){return clearTimeout(d)}},S=l.a.useOrderItems,D=["player"];n.a=function(e){var n,t,a,d=e.livestreamingId,s=Object(v.useRuntime)(),l=s.production,f=s.account,w=S().addItems,h=(t=Object(g.useApolloClient)(),a=Object(m.useOrderForm)(),{setUTM:(n=Object(r.a)(i.a.mark((function e(n){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",O({client:t,orderFormObject:a,utm:n}));case 1:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})}).setUTM,F=Object(m.useOrderForm)().orderForm,N=c()(D),x=k()().addToCartConfig,y=null===window||void 0===window?void 0:window.nizza,j=Object(o.useCallback)(function(){var e=Object(r.a)(i.a.mark((function e(n){var t,a,r,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.product,a=n.quantity,r=void 0===a?1:a,y){e.next=5;break}if(y=null===window||void 0===window?void 0:window.nizza){e.next=5;break}return e.abrupt("return");case 5:return o=y.utils.buildVtexCartItem(t,r),e.abrupt("return",w([o]));case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),[w]),_=Object(o.useMemo)((function(){return{config:{environment:l?"prod":"dev",account:f,idLivestreaming:d,originOfProducts:"VTEX",isInGlobalPage:!1,isInfinite:!0,redirectTo:!1,showChat:!0,showLike:!0,showQuickView:!0,showProductsCarousel:!1,showSidebarProducts:!0,showViewers:!0,time:10,currentOrderForm:F.id,setUTM:h,addToCartConfig:Object.assign(Object.assign({},x),{actionFactory:Object.assign({addToCart:j},null==x?void 0:x.actionFactory)})}}}),[d,F.id]),M=Object(b.i)({id:"nz-player",src:p.a.nzPlayerScript,renderProps:_}).script;return u.a.createElement("div",{className:N.player,id:null==M?void 0:M.fullId})}}}]);; (window.webpackJsonpvtexventures_livestreaming_free_0_37_0=window.webpackJsonpvtexventures_livestreaming_free_0_37_0||[]).push([["ClientLivestreaming"],{0:function(e,n){e.exports=React},1:function(e,n){e.exports=ReactIntl},100:function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtexventures.livestreaming-utils@0.x/useLivestreaming"]},13:function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@0.x/useCssHandles"]},153:function(e,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getLiveStreamingsLive"},variableDefinitions:[],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",name:{kind:"Name",value:"liveStreamingsLive"},arguments:[],directives:[{kind:"Directive",name:{kind:"Name",value:"runtimeMeta"},arguments:[{kind:"Argument",name:{kind:"Name",value:"hash"},value:{kind:"StringValue",value:"574578b7221eb24ea74c57a6c6dc3edf7670588dce3b9a05509a6e2edbb40462",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"eventName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:241}};i.loc.source={body:'query getLiveStreamingsLive @context(sender: "vtexventures.livestreaming-free@0.37.0") {\n liveStreamingsLive @runtimeMeta(hash: "574578b7221eb24ea74c57a6c6dc3edf7670588dce3b9a05509a6e2edbb40462") {\n id\n eventName\n __typename\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var t={};function a(e,n){for(var i=0;i0;){var u=s;s=new Set,u.forEach((function(e){o.has(e)||(o.add(e),(t[e]||new Set).forEach((function(e){s.add(e)})))}))}return o.forEach((function(n){var t=a(e,n);t&&i.definitions.push(t)})),i}(i,"getLiveStreamingsLive")},175:function(e,n,i){"use strict";i.r(n),function(e){var n=i(10);i.p=Object(n.getPublicPath)("vtexventures.livestreaming-free@0.37.0");var t=Object(n.register)((function(){return i(176)}),e,"vtexventures.livestreaming-free@0.37.0","vtexventures.livestreaming-free@0.x","ClientLivestreaming");t.renderHotReload,t.setupHMR}.call(this,i(30)(e))},176:function(e,n,i){"use strict";i.r(n),i.d(n,"schema",(function(){return g}));var t=i(25),a=i(0),r=i.n(a),o=i(7),s=i(1),u=i(54),d=i(8),c=i(153),l=i.n(c),v=i(85),m=Object(s.defineMessages)({id:{id:"admin/editor.live-streaming.id"},title:{id:"admin/editor.live-streaming.title"},showComponent:{id:"admin/editor.live-streaming.show-component"}}),f={title:m.id.id,type:"string",default:"__default__",enum:[""],enumNames:[""]},_=function(e){var n=e.showComponent,i=Object(d.useRuntime)().query,s=null==i?void 0:i.__siteEditor,c=Object(o.useQuery)(l.a,{fetchPolicy:"network-only",ssr:!1,skip:!s}),m=c.loading,_=c.data;return Object(a.useEffect)((function(){var e;if(!(m||!(null===(e=null==_?void 0:_.liveStreamingsLive)||void 0===e?void 0:e.length)||(null==f?void 0:f.enum.length)>1||(null==f?void 0:f.enumNames.length)>1)){var n=null==_?void 0:_.liveStreamingsLive,i=n.map((function(e){return e.id})),a=n.map((function(e){return e.eventName}));f=Object.assign(Object.assign({},f),{enum:[].concat(Object(t.a)(f.enum),Object(t.a)(i)),enumNames:[].concat(Object(t.a)(f.enumNames),Object(t.a)(a))})}}),[_,m]),n?r.a.createElement(u.OrderFormProvider,null,r.a.createElement(v.a,{livestreamingId:e.idLiveStreamingLive})):null},g=function(){return{title:m.title.id,type:"object",properties:{showComponent:{title:m.showComponent.id,type:"boolean"},idLiveStreamingLive:Object.assign({},f)}}};_.displayName="ConfigureLiveStreaming",_.getSchema=g,n.default=_},28:function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtex.session-client@1.x/useFullSession"]},35:function(e,n){e.exports=regeneratorRuntime},42:function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtex.session-client@1.x/useRenderSession"]},54:function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtex.order-manager@0.x/OrderForm"]},7:function(e,n){e.exports=ReactApollo},72:function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtex.order-items@0.x/OrderItems"]},8:function(e,n){e.exports=__RENDER_8_RUNTIME__}},[[175,"common",2,0,1,10]]]);;