!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=4)}([function(t,e,n){"use strict";n.r(e),function(t){n.d(e,"__extends",function(){return o}),n.d(e,"__assign",function(){return i}),n.d(e,"__rest",function(){return s}),n.d(e,"__decorate",function(){return a}),n.d(e,"__param",function(){return u}),n.d(e,"__metadata",function(){return c}),n.d(e,"__awaiter",function(){return l}),n.d(e,"__generator",function(){return f}),n.d(e,"__exportStar",function(){return d}),n.d(e,"__values",function(){return p}),n.d(e,"__read",function(){return h}),n.d(e,"__spread",function(){return y}),n.d(e,"__spreadArrays",function(){return v}),n.d(e,"__await",function(){return m}),n.d(e,"__asyncGenerator",function(){return g}),n.d(e,"__asyncDelegator",function(){return _}),n.d(e,"__asyncValues",function(){return w}),n.d(e,"__makeTemplateObject",function(){return b}),n.d(e,"__importStar",function(){return j}),n.d(e,"__importDefault",function(){return S}); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function o(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s}function u(t,e){return function(n,r){e(n,r,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(e,n,r,o){return new(r||(r=t))(function(t,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(e){e.done?t(e.value):new r(function(t){t(e.value)}).then(s,a)}u((o=o.apply(e,n||[])).next())})}function f(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function h(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function y(){for(var t=[],e=0;e1||u(e,n)})})}function u(e,n){try{(r=i[e](n)).value instanceof m?t.resolve(r.value.v).then(c,l):f(s[0][2],r)}catch(t){f(s[0][3],t)}var r}function c(t){u("next",t)}function l(t){u("throw",t)}function f(t,e){t(e),s.shift(),s.length&&u(s[0][0],s[0][1])}}function _(t){var e,n;return e={},r("next"),r("throw",function(t){throw t}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,o){e[r]=t[r]?function(e){return(n=!n)?{value:m(t[r](e)),done:"return"===r}:o?o(e):e}:o}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,r=e[Symbol.asyncIterator];return r?r.call(e):(e=p(e),n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n);function o(r){n[r]=e[r]&&function(n){return new t(function(o,i){(function(e,n,r,o){t.resolve(o).then(function(t){e({value:t,done:r})},n)})(o,i,(n=e[r](n)).done,n.value)})}}}function b(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function j(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function S(t){return t&&t.__esModule?t:{default:t}}}.call(this,n(1).Promise)},function(t,e,n){(function(e,n){ /*! * @overview es6-promise - a tiny implementation of Promises/A+. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) * @license Licensed under MIT license * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE * @version v4.2.8+1e68dce6 */var r;r=function(){"use strict";function t(t){return"function"==typeof t}var r=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},o=0,i=void 0,s=void 0,a=function(t,e){h[o]=t,h[o+1]=e,2===(o+=2)&&(s?s(y):w())},u="undefined"!=typeof window?window:void 0,c=u||{},l=c.MutationObserver||c.WebKitMutationObserver,f="undefined"==typeof self&&void 0!==e&&"[object process]"==={}.toString.call(e),d="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var t=setTimeout;return function(){return t(y,1)}}var h=new Array(1e3);function y(){for(var t=0;t1?e[1]:"");n[r]=o}),n},t.prototype.isUrlMatchedByRegex=function(t,e){var n=t.location.href;return new RegExp(e).test(n)},t}();e.default=new r},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function e(){this.loadedResources=new Map,this.loadedResourcesCallbacks=new Map}return e.prototype.safeScriptInjection=function(e,n,r){var o=this,i=this;return new t(function(t){if(o.loadedResources.get(n)){var s=o.loadedResourcesCallbacks.get(n);s&&s.push(t)}else o.loadedResources.set(n,!0),o.loadedResourcesCallbacks.set(n,[t]),o.injectScript(e,n,function(){var t=i.loadedResourcesCallbacks.get(n);t&&t.forEach(function(t){t()})},r)})},e.prototype.injectScript=function(t,e,n,r){var o=t,i=o.createElement("script");if(i.onload=n,i.src=e,r){var s=o.getElementsByTagName("script")[0];s&&s.parentNode?s.parentNode.insertBefore(i,s):o.head.appendChild(i)}else i.async=!0,o.head.appendChild(i)},e}();e.default=n}).call(this,n(1).Promise)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(7),i=r.__importDefault(n(3)),s=r.__importDefault(n(9)),a=r.__importDefault(n(10)),u=r.__importDefault(n(11)),c=r.__importDefault(n(12)),l=n(13),f=r.__importDefault(n(15)),d=r.__importDefault(n(16)),p=r.__importDefault(n(18)),h=r.__importDefault(n(20));"undefined"==typeof yotpoWidgetsContainer?console.log("yotpoWidgetsContainer is not defined"):("undefined"!=typeof window&&window.performance&&window.performance.mark&&window.performance.mark("yotpo:initializer:loaded"),yotpoWidgetsContainer.yotpo_widget_initializer=function(t){var e=new s.default,n=new u.default(e,window),r=new i.default,c=new p.default,l=new a.default(r,c),y=new f.default,v=new d.default,m=new h.default(window);return new o.MerchantWidgetsInitializer(t,l,n,window,localStorage,yotpoWidgetsContainer,y,v,m)},yotpoWidgetsContainer.yotpo_request_cache=yotpoWidgetsContainer.yotpo_request_cache||new c.default,yotpoWidgetsContainer.yotpo_script_injector=yotpoWidgetsContainer.yotpo_script_injector||new i.default,yotpoWidgetsContainer.safeScriptInjection=function(t,e,n){yotpoWidgetsContainer.yotpo_script_injector.safeScriptInjection(t,e,n)},l.getOrCreateEventBus())},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var u,c=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var t=a(d);l=!0;for(var e=c.length;e;){for(u=c,c=[];++f1)for(var n=1;n0||"yotpoTrackConversionData"in t)},e.prototype.locateAllV2Widgets=function(t){return t.querySelectorAll(".yotpo-main-widget, .bottomLine, .yotpo-pictures-widget, .embedded-widget, .yotpo-pictures-gallery, .yotpo-badge, .QABottomLine, .yotpo-reviews-carousel, .yotpo-slider, .yotpo-visual-carousel, .yotpo-shoppable-gallery, #yotpo-testimonials-custom-tab, .yotpo.testimonials, .yotpo-single-video, .yotpo-shoppers-say, .y-badge")},e.prototype.isStoreIdValid=function(t){return new RegExp("[A-Za-z0-9]{40}").test(t)},e.prototype.getOldScriptSrc=function(t,e){for(var n=t.getElementsByTagName("script"),r=new RegExp("//(staticw2|w2)\\.yotpo\\.com/[A-Za-z0-9]{40}/widget\\.js.*"),o=0;o0&&(this.injectFonts(t,s),this.injectedFonts=this.injectedFonts.concat(s))}},t.prototype.insertFontsFromWidget=function(t,e){var n=this;t.forEach(function(t){if(e.customizations[t]){var r=e.customizations[t].split("|")[0],o=e.customizations[t].split("|")[1],i=e.instanceId;r&&o&&n.fonts.push({family:r,url:o,widgetInstanceId:i})}})},t.prototype.getFontCustomizations=function(e){var n=e.customizations[t.loadFontsCustomizationKey];return"string"!=typeof n?[]:n.split(",").map(function(t){return t.trim()})||[]},t.prototype.isInPreviewMode=function(t){if(t&&t.body&&[t.body.querySelector(".widget-preview"),t.body.querySelector(".widget-wrapper")].some(function(t){return null!==t}))return!0;return!1},t.prototype.injectFonts=function(t,e){r.loadFonts(t,null,e)},t.loadFontsCustomizationKey="load-font-customizations",t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.loadFonts=e.loadFont=e.isFontInjected=e.yotpoFontClassName=void 0;var r=["fonts.googleapis.com/css","cdn-widgetsrepository.yotpo.com/web-fonts/css","staticw2.yotpo.com/web-fonts/css"];e.yotpoFontClassName="yotpo-font",e.isFontInjected=function(t,n,r){var o;for(var i in void 0===r&&(r=t.getElementsByClassName(e.yotpoFontClassName)),r)if(null===(o=null==r?void 0:r[i].textContent)||void 0===o?void 0:o.includes(n.url))return!0;return!1},e.loadFont=function(t,n,o){var i=t.createElement("style");i.classList.add(e.yotpoFontClassName);var s="";r.some(function(t){return n.url.includes(t)})?s="@import url('"+n.url+"');":n.url&&(s='\n @font-face {\n font-family: "'+n.family+"\";\n src: url('"+n.url+"');\n font-display: swap;\n }"),i.innerHTML=s,o?o.appendChild(i):t.head.appendChild(i)},e.loadFonts=function(t,n,r){r&&r.forEach(function(r){return e.loadFont(t,r,n)})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0).__importDefault(n(2)),o=function(){function t(t){this.FORCE_SHOW_YOTPO_WIDGET="force-show-yotpo-widget",this.YOTPO_DOMAIN="yotpo.com",this.windowElement=t}return t.prototype.setForceShowQueryParamToLocalStorage=function(){var t=r.default.getQueryParams(this.windowElement)[this.FORCE_SHOW_YOTPO_WIDGET];t&&localStorage.setItem(this.FORCE_SHOW_YOTPO_WIDGET,t)},t.prototype.shouldLoadWidget=function(t){return!this.shouldHideIfUrlMatchQueryParam(t)&&(r.default.isUrlMatchedByRegex(this.windowElement,this.YOTPO_DOMAIN)||this.shouldShow(t)||this.shouldShowIfUrlMatchQueryParam()||"true"===localStorage.getItem(this.FORCE_SHOW_YOTPO_WIDGET))},t.prototype.shouldShow=function(t){var e;return!(null===(e=null==t?void 0:t.staticContent)||void 0===e?void 0:e.isHidden)},t.prototype.shouldShowIfUrlMatchQueryParam=function(){return this.isQueryParamExists(["oseid"])},t.prototype.shouldHideIfUrlMatchQueryParam=function(t){var e,n;return!(null===(e=null==t?void 0:t.staticContent)||void 0===e||!e.hideIfMatchingQueryParam)&&this.isQueryParamExists(null===(n=null==t?void 0:t.staticContent)||void 0===n?void 0:n.hideIfMatchingQueryParam)},t.prototype.isQueryParamExists=function(t){for(var e=r.default.getQueryParams(this.windowElement),n=0,o=t;n