@ekolabs/eko-gallery-react
Version:
eko gallery for react framework
14 lines • 87.9 kB
JavaScript
import e,{useRef as n,useState as o,createRef as t,useCallback as a,useEffect as r,forwardRef as i,useImperativeHandle as l,memo as s}from"react";function c(e){return`if (!window.EkoAnalytics) {\n !function () {\n var t, a, e, s, n;\n 'undefined' == typeof window || window.EkoAnalytics || (t = window, a = 'EkoAnalytics', e = document, s = 'script', t[a] || (t[a] = function () {\n t[a].f ? (t[a].q.push(arguments), t[a].ts.push(Date.now())) : t[a].apply(t, arguments);\n }, t[a].f = !0, t[a].q = t[a].q || [], t[a].ts = t[a].ts || [], t[a].t = Number(new Date), t[a].sa = [], t[a].cb = [], t[a].init = function (ids) {\n t[a].id = ids;\n }, t[a].childRequestIdsCallback = function (e) {\n e.data && 'ea-ids-request' === e.data.type && t[a].sa.push(e.source);\n }, t.addEventListener('message', t[a].childRequestIdsCallback)));\n }();\n\n window.EkoAnalytics.cb.push(() => {\n let setCookie = (key, value, additionalProperties = '') => {\n let hostname = window.location.hostname;\n let domain = hostname;\n \n let parts = hostname.split('.');\n if (parts.length > 2) {\n domain = parts.slice(-2).join('.');\n }\n\n // "samesite=lax" is needed for cross-site situations (like NZXT getting checkout url attributes from lambda).\n window.document.cookie = \`\${key}=\${value}; domain=.\${domain}; path=/; secure; samesite=lax; \${additionalProperties}\`;\n };\n\n setCookie('easid', encodeURIComponent(window.EkoAnalytics('getSid')));\n setCookie('eauid', encodeURIComponent(window.EkoAnalytics('getUid')), 'max-age=2147483647');\n });\n\n window.EkoAnalytics('configure', {\n snowplow: {\n options: {\n appId: 'ekoGalleryReact',\n },\n },\n ekoEnv: '${e?"production":"development"}',\n env: 'website',\n });\n window.EkoAnalytics('track', 'PageView');\n }`}function d(e,n="*",o=""){let t=`https://${o}play.eko.com/api/v1/channels/${e}/configs`;return t+="*"!==n?`/${n}`:"",t}function u(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}var k={pack:function(e){const n={};if(!u(e))return n;if(e.itemId&&(n.item_id=e.itemId),e.itemName&&(n.item_name=e.itemName),u(e.itemPrice)){const o=e.itemPrice;n.item_price=function(e){const n={};return u(e)&&(e.amount&&(n.amount=Number(e.amount)),e.currency&&(n.currency=e.currency)),n}(o)}return e.quantity&&(n.quantity=Number(e.quantity)),n}};const v="mobile",p="notmobile";function m(){return((window.navigator.userAgentData?window.navigator.userAgentData.mobile:navigator.maxTouchPoints>0&&/Mobile|Android|webOS|iPhone|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&!/Tablet|iPad/i.test(navigator.userAgent))?v:p)===v}const g={};class y{constructor(e){this.key=`eko.${e}`}setDataStorage(e,n){if("undefined"!=typeof window)try{var o,t;let a=null===(o=window.localStorage)||void 0===o?void 0:o.getItem(this.key);a=JSON.parse(a)||{},a[e]=n,null===(t=window.localStorage)||void 0===t||t.setItem(this.key,JSON.stringify(a))}catch(e){console.error(`[setDataStorage]: ${e}`)}}getDataStorage(e){if("undefined"!=typeof window)try{var n;let o=null===(n=window.localStorage)||void 0===n?void 0:n.getItem(this.key);return o=JSON.parse(o)||{},o[e]}catch(e){console.error(`[getDataStorage]: ${e}`)}}removeDataStorage(e){if("undefined"!=typeof window)try{var n;let t=null===(n=window.localStorage)||void 0===n?void 0:n.getItem(this.key);var o;if(t)if(t=JSON.parse(t),delete t[e],Object.keys(t).length>0)null===(o=window.localStorage)||void 0===o||o.setItem(this.key,JSON.stringify(t));else this.removeAll()}catch(e){console.error(`[removeDataStorage]: ${e}`)}}removeAll(){if("undefined"!=typeof window)try{var e;null===(e=window.localStorage)||void 0===e||e.removeItem(this.key)}catch(e){console.error(`[removeAll]: ${e}`)}}}function f(e){return g[e]||(g[e]=new y(e)),g[e]}const b=f("gallery-react").getDataStorage("gallery-react");function h(e){window.EkoAnalytics("registerContextPacker",{tag:e,match:/.*/,schema:"iglu:com.helloeko/products/jsonschema/1-0-1",getData(e={}){var n,o;if(e.items)return{items:e.items.map((e=>function(e){const n=k.pack(e);return e.id&&(n.id=e.id),e.sku&&(n.sku=e.sku),e.upc&&(n.upc=e.upc),e.name&&(n.name=e.name),n}(e)))};const t=(null===(n=window.eko)||void 0===n||null===(n=n.config)||void 0===n?void 0:n.product)||(null==b||null===(o=b.config)||void 0===o?void 0:o.product);if(t){return{items:[{id:t.id,item_id:t.sku,sku:t.sku,upc:t.upc,typeid:t.type,name:t.name}]}}return null}})}function w(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function x(e){const n={};return w(e)&&(e.amount&&(n.amount=Number(e.amount)),e.currency&&(n.currency=e.currency)),n}var E={isObject:w,pricePack:x,itemPack:function(e){const n={};if(!w(e))return n;if(e.itemId&&(n.item_id=e.itemId),e.itemName&&(n.item_name=e.itemName),w(e.itemPrice)){const o=e.itemPrice;n.item_price=x(o)}return e.quantity&&(n.quantity=Number(e.quantity)),e.sellingPlan&&(n.selling_plan=function(e){const n={};return w(e)&&(e.id&&(n.id=e.id),e.name&&(n.name=e.name)),n}(e.sellingPlan)),n}};const I=f("gallery-react").getDataStorage("gallery-react");const M=f("gallery-react").getDataStorage("gallery-react");const S=f("gallery-react").getDataStorage("gallery-react");const D="eko-gallery-react";var j={register:function(){var e;e=D,window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/page/jsonschema/1-0-0",match:/^pixel\..*/,getData:function(){return{url:document.location.href||"",referrer:document.referrer||"",title:document.title||""}}}),h(D),function(e){window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/cart/jsonschema/1-0-1",match:/pixel\.cart\.(add|remove)$/,getData(e){const n={};if((e=e||{}).cartId&&(n.cart_id=e.cartId),Array.isArray(e.items)&&(n.items=e.items.map((e=>E.itemPack(e)))),E.isObject(e.totalPrice)){const o=e.totalPrice;n.total_price=E.pricePack(o)}return e.totalQuantity&&(n.total_quantity=Number(e.totalQuantity)),n}})}(D),function(e){window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/organization/jsonschema/1-0-0",match:/.*/,getData:function(){var e,n;const o=(null===(e=window.eko)||void 0===e||null===(e=e.config)||void 0===e?void 0:e.customer)||(null==I||null===(n=I.config)||void 0===n?void 0:n.customer);if(o)return{id:null==o?void 0:o.organizationId}}})}(D),function(e){window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/space/jsonschema/1-0-2",match:/.*/,getData:function(){var e,n;const o=(null===(e=window.eko)||void 0===e||null===(e=e.config)||void 0===e?void 0:e.customer)||(null==M||null===(n=M.config)||void 0===n?void 0:n.customer);if(o)return{id:null==o?void 0:o.spaceId}}})}(D),function(e){window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/asset/jsonschema/1-0-1",match:/.*/,getData:function(e){var n,o;if(null!=e&&e.type&&null!=e&&e.publishitemid&&null!=e&&e.name)return{deliverableid:"",publishitemid:null==e?void 0:e.publishitemid,type:null==e?void 0:e.type,name:null==e?void 0:e.name,artifactid:""};const t=null===(n=window.eko)||void 0===n||null===(n=n.config)||void 0===n?void 0:n.__autoGenerated.publishItem,a=null==S||null===(o=S.config)||void 0===o?void 0:o.__autoGenerated.publishItem,r=t||a;return r?{deliverableid:"",publishitemid:null==r?void 0:r.id,type:"interactive",name:"",artifactid:""}:void 0}})}(D),function(e){window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/traffic_allocation/jsonschema/1-0-0",match:"trafficallocation.decision",getData:function(e){if(!e)return;const n={decision:e.decision};return e.config&&(n.config=e.config),isNaN(e.traffic_split)||(n.traffic_split=e.traffic_split),e.provider&&(n.provider=e.provider),n}})}(D),function(e){window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/checkout/jsonschema/1-0-4",match:/pixel\.(checkout|order)$/,getData(e){const n={};if((e=e||{}).checkoutId&&(n.checkout_id=e.checkoutId),Array.isArray(e.items)&&(n.items=e.items.map((e=>E.itemPack(e)))),E.isObject(e.totalPrice)){const o=e.totalPrice;n.total_price=E.pricePack(o)}return e.totalQuantity&&(n.total_quantity=Number(e.totalQuantity)),n}})}(D),function(e){window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/order/jsonschema/1-0-2",match:"pixel.order",getData(e){const n={};if((e=e||{}).orderId&&(n.order_id=e.orderId),Array.isArray(e.items)&&(n.items=e.items.map((e=>E.itemPack(e)))),E.isObject(e.totalPrice)){const o=e.totalPrice;n.total_price=E.pricePack(o)}return e.totalQuantity&&(n.total_quantity=Number(e.totalQuantity)),n}})}(D)}};function P(e,n){let o="";try{o=window[e].getItem(n),o||(o=function(e){const n=document.cookie.split(";");for(let o=0;o<n.length;o++){const t=n[o].trim();if(0===t.indexOf(e+"="))return t.substring(e.length+1)}return""}(n))}catch(e){console.warn("[eko-gallery-react] Error while getting the id from storage:",n,e)}return o}function T(e){let n=Array.isArray(e.items)?e.items:[e];return n=n.map((e=>({itemId:e.id,itemName:e.name,itemPrice:e.price,quantity:e.quantity||1,variantId:e.variantId,sellingPlan:e.sellingPlan}))),n}function C(e){return{cartId:e.cartId,items:T(e),totalPrice:e.totalPrice,totalQuantity:e.totalQuantity}}var A={"pixel.cart.add":C,"pixel.cart.remove":C,"pixel.product_viewed":function(e){let n=T(e);return n=n.map((e=>function(e){let n=P("localStorage","eko.metadata");if(n&&n[e.itemId]){let o=n[e.itemId].product;e.id=null==o?void 0:o.id,e.sku=null==o?void 0:o.sku,e.upc=null==o?void 0:o.upc,e.name=null==o?void 0:o.name}return e}(e))),{items:n}},"pixel.checkout":function(e){return{checkoutId:e.checkoutId,items:T(e),totalPrice:e.totalPrice,totalQuantity:e.totalQuantity}},"pixel.order":function(e){return{checkoutId:e.checkoutId,orderId:e.orderId,items:T(e),totalPrice:e.totalPrice,totalQuantity:e.totalQuantity}}};const $="https://storage.eko.com/efu/ekoanalytics/master/latest/EkoAnalyticsPlatform.min.gz.js";let q=!1;var O={init:function(e){j.register(),function(e){if(q)return;let n=e?window.location.host:"development";const o=document.createElement("script");o.setAttribute("pxid",n),o.type="text/javascript",o.async=!0,o.src=$,document.body.appendChild(o),q=!0}(e)},onRouteChanged:function(){window.EkoAnalytics("reset")},track:function(e,n){A[e]&&(n=A[e](n)),window.EkoAnalytics("track",e,n)}};function R(){return R=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var t in o)({}).hasOwnProperty.call(o,t)&&(e[t]=o[t])}return e},R.apply(null,arguments)}function N(e,n){return e(n={exports:{}},n.exports),n.exports
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/}var B="function"==typeof Symbol&&Symbol.for,_=B?Symbol.for("react.element"):60103,z=B?Symbol.for("react.portal"):60106,L=B?Symbol.for("react.fragment"):60107,F=B?Symbol.for("react.strict_mode"):60108,W=B?Symbol.for("react.profiler"):60114,G=B?Symbol.for("react.provider"):60109,V=B?Symbol.for("react.context"):60110,H=B?Symbol.for("react.async_mode"):60111,U=B?Symbol.for("react.concurrent_mode"):60111,Y=B?Symbol.for("react.forward_ref"):60112,Q=B?Symbol.for("react.suspense"):60113,J=B?Symbol.for("react.suspense_list"):60120,X=B?Symbol.for("react.memo"):60115,Z=B?Symbol.for("react.lazy"):60116,K=B?Symbol.for("react.block"):60121,ee=B?Symbol.for("react.fundamental"):60117,ne=B?Symbol.for("react.responder"):60118,oe=B?Symbol.for("react.scope"):60119;function te(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case _:switch(e=e.type){case H:case U:case L:case W:case F:case Q:return e;default:switch(e=e&&e.$$typeof){case V:case Y:case Z:case X:case G:return e;default:return n}}case z:return n}}}function ae(e){return te(e)===U}var re={AsyncMode:H,ConcurrentMode:U,ContextConsumer:V,ContextProvider:G,Element:_,ForwardRef:Y,Fragment:L,Lazy:Z,Memo:X,Portal:z,Profiler:W,StrictMode:F,Suspense:Q,isAsyncMode:function(e){return ae(e)||te(e)===H},isConcurrentMode:ae,isContextConsumer:function(e){return te(e)===V},isContextProvider:function(e){return te(e)===G},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===_},isForwardRef:function(e){return te(e)===Y},isFragment:function(e){return te(e)===L},isLazy:function(e){return te(e)===Z},isMemo:function(e){return te(e)===X},isPortal:function(e){return te(e)===z},isProfiler:function(e){return te(e)===W},isStrictMode:function(e){return te(e)===F},isSuspense:function(e){return te(e)===Q},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===L||e===U||e===W||e===F||e===Q||e===J||"object"==typeof e&&null!==e&&(e.$$typeof===Z||e.$$typeof===X||e.$$typeof===G||e.$$typeof===V||e.$$typeof===Y||e.$$typeof===ee||e.$$typeof===ne||e.$$typeof===oe||e.$$typeof===K)},typeOf:te},ie=N((function(e,n){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,o=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,k=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,f=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function h(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case o:var v=e.type;switch(v){case c:case d:case a:case i:case r:case k:return v;default:var g=v&&v.$$typeof;switch(g){case s:case u:case m:case p:case l:return g;default:return n}}case t:return n}}}var w=c,x=d,E=s,I=l,M=o,S=u,D=a,j=m,P=p,T=t,C=i,A=r,$=k,q=!1;function O(e){return h(e)===d}n.AsyncMode=w,n.ConcurrentMode=x,n.ContextConsumer=E,n.ContextProvider=I,n.Element=M,n.ForwardRef=S,n.Fragment=D,n.Lazy=j,n.Memo=P,n.Portal=T,n.Profiler=C,n.StrictMode=A,n.Suspense=$,n.isAsyncMode=function(e){return q||(q=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),O(e)||h(e)===c},n.isConcurrentMode=O,n.isContextConsumer=function(e){return h(e)===s},n.isContextProvider=function(e){return h(e)===l},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},n.isForwardRef=function(e){return h(e)===u},n.isFragment=function(e){return h(e)===a},n.isLazy=function(e){return h(e)===m},n.isMemo=function(e){return h(e)===p},n.isPortal=function(e){return h(e)===t},n.isProfiler=function(e){return h(e)===i},n.isStrictMode=function(e){return h(e)===r},n.isSuspense=function(e){return h(e)===k},n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===i||e===r||e===k||e===v||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===p||e.$$typeof===l||e.$$typeof===s||e.$$typeof===u||e.$$typeof===y||e.$$typeof===f||e.$$typeof===b||e.$$typeof===g)},n.typeOf=h}()}));ie.AsyncMode,ie.ConcurrentMode,ie.ContextConsumer,ie.ContextProvider,ie.Element,ie.ForwardRef,ie.Fragment,ie.Lazy,ie.Memo,ie.Portal,ie.Profiler,ie.StrictMode,ie.Suspense,ie.isAsyncMode,ie.isConcurrentMode,ie.isContextConsumer,ie.isContextProvider,ie.isElement,ie.isForwardRef,ie.isFragment,ie.isLazy,ie.isMemo,ie.isPortal,ie.isProfiler,ie.isStrictMode,ie.isSuspense,ie.isValidElementType,ie.typeOf;var le=N((function(e){"production"===process.env.NODE_ENV?e.exports=re:e.exports=ie})),se=Object.getOwnPropertySymbols,ce=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable;
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var ue=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var n={},o=0;o<10;o++)n["_"+String.fromCharCode(o)]=o;var t=Object.getOwnPropertyNames(n).map((function(e){return n[e]}));if("0123456789"!==t.join(""))return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach((function(e){a[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(e){return!1}}()?Object.assign:function(e,n){for(var o,t,a=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),r=1;r<arguments.length;r++){for(var i in o=Object(arguments[r]))ce.call(o,i)&&(a[i]=o[i]);if(se){t=se(o);for(var l=0;l<t.length;l++)de.call(o,t[l])&&(a[t[l]]=o[t[l]])}}return a},ke="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ve=Function.call.bind(Object.prototype.hasOwnProperty),pe=function(){};if("production"!==process.env.NODE_ENV){var me=ke,ge={},ye=ve;pe=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}}}function fe(e,n,o,t,a){if("production"!==process.env.NODE_ENV)for(var r in e)if(ye(e,r)){var i;try{if("function"!=typeof e[r]){var l=Error((t||"React class")+": "+o+" type `"+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[r]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}i=e[r](n,r,t,o,null,me)}catch(e){i=e}if(!i||i instanceof Error||pe((t||"React class")+": type specification of "+o+" `"+r+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in ge)){ge[i.message]=!0;var s=a?a():"";pe("Failed "+o+" type: "+i.message+(null!=s?s:""))}}}fe.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(ge={})};var be=fe,he=function(){};function we(){return null}"production"!==process.env.NODE_ENV&&(he=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}});var xe=function(e,n){var o="function"==typeof Symbol&&Symbol.iterator,t="@@iterator";var a="<<anonymous>>",r={array:c("array"),bigint:c("bigint"),bool:c("boolean"),func:c("function"),number:c("number"),object:c("object"),string:c("string"),symbol:c("symbol"),any:s(we),arrayOf:function(e){return s((function(n,o,t,a,r){if("function"!=typeof e)return new l("Property `"+r+"` of component `"+t+"` has invalid PropType notation inside arrayOf.");var i=n[o];if(!Array.isArray(i))return new l("Invalid "+a+" `"+r+"` of type `"+k(i)+"` supplied to `"+t+"`, expected an array.");for(var s=0;s<i.length;s++){var c=e(i,s,t,a,r+"["+s+"]",ke);if(c instanceof Error)return c}return null}))},element:s((function(n,o,t,a,r){var i=n[o];return e(i)?null:new l("Invalid "+a+" `"+r+"` of type `"+k(i)+"` supplied to `"+t+"`, expected a single ReactElement.")})),elementType:s((function(e,n,o,t,a){var r=e[n];return le.isValidElementType(r)?null:new l("Invalid "+t+" `"+a+"` of type `"+k(r)+"` supplied to `"+o+"`, expected a single ReactElement type.")})),instanceOf:function(e){return s((function(n,o,t,r,i){if(!(n[o]instanceof e)){var s=e.name||a;return new l("Invalid "+r+" `"+i+"` of type `"+(((c=n[o]).constructor&&c.constructor.name?c.constructor.name:a)+"` supplied to `")+t+"`, expected instance of `"+s+"`.")}var c;return null}))},node:s((function(e,n,o,t,a){return u(e[n])?null:new l("Invalid "+t+" `"+a+"` supplied to `"+o+"`, expected a ReactNode.")})),objectOf:function(e){return s((function(n,o,t,a,r){if("function"!=typeof e)return new l("Property `"+r+"` of component `"+t+"` has invalid PropType notation inside objectOf.");var i=n[o],s=k(i);if("object"!==s)return new l("Invalid "+a+" `"+r+"` of type `"+s+"` supplied to `"+t+"`, expected an object.");for(var c in i)if(ve(i,c)){var d=e(i,c,t,a,r+"."+c,ke);if(d instanceof Error)return d}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&he(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),we;return s((function(n,o,t,a,r){for(var s=n[o],c=0;c<e.length;c++)if(i(s,e[c]))return null;var d=JSON.stringify(e,(function(e,n){return"symbol"===v(n)?String(n):n}));return new l("Invalid "+a+" `"+r+"` of value `"+String(s)+"` supplied to `"+t+"`, expected one of "+d+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&he("Invalid argument supplied to oneOfType, expected an instance of array."),we;for(var n=0;n<e.length;n++){var o=e[n];if("function"!=typeof o)return he("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+p(o)+" at index "+n+"."),we}return s((function(n,o,t,a,r){for(var i=[],s=0;s<e.length;s++){var c=(0,e[s])(n,o,t,a,r,ke);if(null==c)return null;c.data&&ve(c.data,"expectedType")&&i.push(c.data.expectedType)}return new l("Invalid "+a+" `"+r+"` supplied to `"+t+"`"+(i.length>0?", expected one of type ["+i.join(", ")+"]":"")+".")}))},shape:function(e){return s((function(n,o,t,a,r){var i=n[o],s=k(i);if("object"!==s)return new l("Invalid "+a+" `"+r+"` of type `"+s+"` supplied to `"+t+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return d(t,a,r,c,v(u));var p=u(i,c,t,a,r+"."+c,ke);if(p)return p}return null}))},exact:function(e){return s((function(n,o,t,a,r){var i=n[o],s=k(i);if("object"!==s)return new l("Invalid "+a+" `"+r+"` of type `"+s+"` supplied to `"+t+"`, expected `object`.");var c=ue({},n[o],e);for(var u in c){var p=e[u];if(ve(e,u)&&"function"!=typeof p)return d(t,a,r,u,v(p));if(!p)return new l("Invalid "+a+" `"+r+"` key `"+u+"` supplied to `"+t+"`.\nBad object: "+JSON.stringify(n[o],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=p(i,u,t,a,r+"."+u,ke);if(m)return m}return null}))}};function i(e,n){return e===n?0!==e||1/e==1/n:e!=e&&n!=n}function l(e,n){this.message=e,this.data=n&&"object"==typeof n?n:{},this.stack=""}function s(e){if("production"!==process.env.NODE_ENV)var o={},t=0;function r(r,i,s,c,d,u,k){if(c=c||a,u=u||s,k!==ke){if(n){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var p=c+":"+s;!o[p]&&t<3&&(he("You are manually calling a React.PropTypes validation function for the `"+u+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),o[p]=!0,t++)}}return null==i[s]?r?null===i[s]?new l("The "+d+" `"+u+"` is marked as required in `"+c+"`, but its value is `null`."):new l("The "+d+" `"+u+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(i,s,c,d,u)}var i=r.bind(null,!1);return i.isRequired=r.bind(null,!0),i}function c(e){return s((function(n,o,t,a,r,i){var s=n[o];return k(s)!==e?new l("Invalid "+a+" `"+r+"` of type `"+v(s)+"` supplied to `"+t+"`, expected `"+e+"`.",{expectedType:e}):null}))}function d(e,n,o,t,a){return new l((e||"React class")+": "+n+" type `"+o+"."+t+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+a+"`.")}function u(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(u);if(null===n||e(n))return!0;var a=function(e){var n=e&&(o&&e[o]||e[t]);if("function"==typeof n)return n}(n);if(!a)return!1;var r,i=a.call(n);if(a!==n.entries){for(;!(r=i.next()).done;)if(!u(r.value))return!1}else for(;!(r=i.next()).done;){var l=r.value;if(l&&!u(l[1]))return!1}return!0;default:return!1}}function k(e){var n=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,n){return"symbol"===e||!!n&&("Symbol"===n["@@toStringTag"]||"function"==typeof Symbol&&n instanceof Symbol)}(n,e)?"symbol":n}function v(e){if(null==e)return""+e;var n=k(e);if("object"===n){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return n}function p(e){var n=v(e);switch(n){case"array":case"object":return"an "+n;case"boolean":case"date":case"regexp":return"a "+n;default:return n}}return l.prototype=Error.prototype,r.checkPropTypes=be,r.resetWarningCache=be.resetWarningCache,r.PropTypes=r,r};function Ee(){}function Ie(){}Ie.resetWarningCache=Ee;var Me=N((function(e){if("production"!==process.env.NODE_ENV){var n=le;e.exports=xe(n.isElement,!0)}else e.exports=function(){function e(e,n,o,t,a,r){if(r!==ke){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function n(){return e}e.isRequired=e;var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:Ie,resetWarningCache:Ee};return o.PropTypes=o,o}()}));const Se=/https?:\/\/(.*?\.)?eko.com/,De={"eko.project.interaction":"interaction","eko.project.swipe":"swipe"};let je=null,Pe=null,Te=[];function Ce(e){return n=>{var o;if(!Se.test(n.origin)||"eko.embedapi"!==(null===(o=n.data)||void 0===o?void 0:o.source))return;const t=n.data,a=De[t.type];a&&(e?e(a,t.data):Te.push({type:a,data:t.data}))}}"undefined"!=typeof window&&(Pe=Ce(null),window.addEventListener("message",Pe));var Ae={subscribe:function(e){"function"==typeof e?je?console.warn("[eko-gallery-react] Ignoring events subscribe since already subscribed"):(je=e,Pe=Ce(e),window.addEventListener("message",Pe),function(e){Te.forEach((n=>{e(n.type,n.data)})),Te=[]}(e)):console.warn("[eko-gallery-react] Ignoring events subscribe since a callback function was not provided as argument")},unsubscribe:function(){Pe?(window.removeEventListener("message",Pe),Pe=null,je=null,Te=[]):console.warn("[eko-gallery-react] Ignoring events unsubscribe since not subscribed")},send:function(e,n){je?je(e,n):Te.push({type:e,data:n})}};const $e=({index:n,activeIndex:o,setActiveIndex:t,item:a,src:r,navItemRefs:i,itemIcon:l})=>{var s,c;const d=null==a||null===(s=a.media)||void 0===s?void 0:s.srcset,u=null==a||null===(c=a.media)||void 0===c?void 0:c.sizes,k=!r&&(null==a?void 0:a.label),v=d?r:function(e,n=200){if(!e)return null;try{let o=e;e.includes("assets.eko.com")&&e.includes("/raw/")&&(o=e.replace("/raw/","/image/"));const t=new URL(o);return t.searchParams.set("width",n),t.href}catch(n){return e}}(r,150);let p=["addons-container",k?"full-thumb-label":""].join(" ").trim();return e.createElement("li",{className:"eko-nav-item","aria-current":o===n,onClick:function(){t(n),function(e){O.track("gallery.interaction",{elementid:`thumbnail-${e}`,interactiontype:"click"}),Ae.send("interaction",{elementid:`thumbnail-${e}`,interactiontype:"click"})}(n)},ref:i.current[n]},e.createElement("button",{type:"button","aria-label":`Go to item ${n}`},!k&&e.createElement("img",{src:v,srcSet:d,sizes:u,alt:null==a?void 0:a.name,loading:"eager",fetchPriority:"high"}),e.createElement("div",{className:p},(null==a?void 0:a.stepsIndication)&&e.createElement("div",{className:"step-indicator"},e.createElement("span",null),e.createElement("span",null),e.createElement("span",null)),(null==a?void 0:a.label)&&e.createElement("div",{className:"thumb-label"},null==a?void 0:a.label)),l&&e.createElement("div",{className:"item-icon"},e.createElement("span",{style:{backgroundImage:`url(${l})`}}))))};$e.propTypes={index:Me.number,activeIndex:Me.number,setActiveIndex:Me.func.isRequired,item:Me.object.isRequired,src:Me.string,navItemRefs:Me.object.isRequired,itemIcon:Me.string};const qe=({layout:o,nav:t,isVerticalNav:a,showPrevArrow:r,showNextArrow:i})=>{var l,s,c,d,u;const k=n(null),v=n(null),p="arrows"===(null==o||null===(l=o.mobile)||void 0===l||null===(l=l.config)||void 0===l||null===(l=l.navPagination)||void 0===l?void 0:l.type)?"eko-mobile-arrows":"",m="arrows"===(null!==(s=null==o||null===(c=o.desktop)||void 0===c||null===(c=c.config)||void 0===c||null===(c=c.navPagination)||void 0===c?void 0:c.type)&&void 0!==s?s:"arrows")?"eko-desktop-arrows":"",g=p||m,y=a?null==t||null===(d=t.current)||void 0===d?void 0:d.scrollHeight:null==t||null===(u=t.current)||void 0===u?void 0:u.scrollWidth;function f(e){const n=a?t.current.clientHeight:t.current.clientWidth,o=function(e,n){const o=a?n.scrollTop:n.scrollLeft;return Math.max(-o,Math.min(y-e-o,e))}("next"===e?n:-n,t.current);return{top:a?o:0,left:a?0:o,behavior:"smooth"}}function b(e){var n,o,a;const r=f(e),i="next"===e?null==v||null===(n=v.current)||void 0===n?void 0:n.id:null==k||null===(o=k.current)||void 0===o?void 0:o.id;var l,s;window.EkoAnalytics("track","gallery.interaction",{elementid:i,interactiontype:"click"}),null==t||null===(a=t.current)||void 0===a||a.scrollBy(r),l=i,s="click",O.track("gallery.interaction",{elementId:l,interactiontype:s}),Ae.send("interaction",{elementId:l,interactiontype:s})}return e.createElement(e.Fragment,null,g&&e.createElement(e.Fragment,null,e.createElement("button",R({type:"button","aria-label":"Go to previous item","aria-hidden":r?"false":"true",onClick:()=>b("prev"),ref:k,id:"eko-nav-prev-arrow",className:`eko-nav-arrow eko-prev-nav-button ${p} ${m} ${r?"":"eko-hidden-nav-button"}`},r?{}:{tabIndex:"-1"}),e.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M5.56127 9.52817C5.28966 9.22635 5.28966 8.77361 5.56127 8.502L10.39 3.67331C10.6918 3.37157 11.1445 3.37157 11.4161 3.67331C11.7179 3.94492 11.7179 4.39766 11.4161 4.66927L7.10044 8.98487L11.4161 13.3307C11.7179 13.6023 11.7179 14.055 11.4161 14.3266C11.1445 14.6285 10.6918 14.6285 10.4202 14.3266L5.56127 9.52817Z",fill:"black"}))),e.createElement("button",R({type:"button","aria-label":"Go to next item","aria-hidden":i?"false":"true",onClick:()=>b("next"),ref:v,className:`eko-nav-arrow eko-next-nav-button ${p} ${m} ${i?"":"eko-hidden-nav-button"}`,id:"eko-nav-next-arrow"},i?{}:{tabIndex:"-1"}),e.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M12.4387 8.47185C12.7103 8.77367 12.7103 9.22641 12.4387 9.49802L7.61003 14.3267C7.30821 14.6284 6.85547 14.6284 6.58386 14.3267C6.28212 14.0551 6.28212 13.6024 6.58386 13.3308L10.8996 9.01515L6.58386 4.66933C6.28212 4.39772 6.28212 3.94499 6.58386 3.67338C6.85547 3.37155 7.30821 3.37155 7.57982 3.67338L12.4387 8.47185Z",fill:"black"})))))};function Oe(e,n,o){let t;return function(){const o=this,a=arguments;clearTimeout(t),t=setTimeout((function(){t=null,e.apply(o,a)}),n)}}qe.propTypes={layout:Me.object.isRequired,nav:Me.object.isRequired,isVerticalNav:Me.bool.isRequired,showPrevArrow:Me.bool.isRequired,showNextArrow:Me.bool.isRequired};const Re=({items:i,setActiveIndex:l,activeIndex:s,layout:c,carouselMounted:d,forceMobile:u})=>{const k=n(null),v=n(null),p=n([]),g=3,[y,f]=o(null),[b,h]=o(!1),[w,x]=o(0),[E,I]=o(!1),[M,S]=o(!1);function D(){var e;const n=u||window.innerWidth<768?"mobile":"desktop",o=(null==c||null===(e=c[n])||void 0===e||null===(e=e.config)||void 0===e?void 0:e.orientation)||("desktop"===n?"left":"bottom");h("left"===o||"right"===o);const t=v.current.parentNode,a=d?".eko-smart-gallery-container iframe":".eko-carousel",r=t.querySelector(a);setTimeout((()=>{x(r.clientHeight)}),0)}function j(){var e,n;const o=u||m()?"mobile":"desktop",t=null!==(e=null==c||null===(n=c[o])||void 0===n||null===(n=n.config)||void 0===n||null===(n=n.navPagination)||void 0===n?void 0:n.scrollThreshold)&&void 0!==e?e:g;!function(e=g){var n,o;const t=k.current;if(!t)return;const a="none"!==(null==c||null===(n=c.desktop)||void 0===n||null===(n=n.config)||void 0===n||null===(n=n.navPagination)||void 0===n?void 0:n.type),r=(i=null==c||null===(o=c.mobile)||void 0===o||null===(o=o.config)||void 0===o||null===(o=o.navPagination)||void 0===o?void 0:o.type,"mask"===i||"arrows"===i);var i;if((u||m())&&!r)return void t.style.setProperty("-webkit-mask","none");if(!m()&&!a)return void t.style.setProperty("-webkit-mask","none");const l=t.scrollHeight-t.clientHeight,s=t.scrollTop>e?"85%":"100%",d=t.scrollTop<=l-e?"15%":"0%",v=t.scrollWidth-t.clientWidth,p=t.scrollLeft>e?"15%":"0%",y=t.scrollLeft<=v-e?"85%":"100%";b?t.style.setProperty("-webkit-mask",`linear-gradient(0deg,#0000,#000 ${d} ${s},#0000)`):t.style.setProperty("-webkit-mask",`linear-gradient(90deg,#0000,#000 ${p} ${y},#0000)`)}(t),function(e=g){var n,o,t,a,r,i;const l=b?null==k||null===(n=k.current)||void 0===n?void 0:n.scrollTop:null==k||null===(o=k.current)||void 0===o?void 0:o.scrollLeft,s=b?null==k||null===(t=k.current)||void 0===t?void 0:t.clientHeight:null==k||null===(a=k.current)||void 0===a?void 0:a.clientWidth,c=b?null==k||null===(r=k.current)||void 0===r?void 0:r.scrollHeight:null==k||null===(i=k.current)||void 0===i?void 0:i.scrollWidth;c-e<s?(I(!1),S(!1)):l<=e?(I(!1),S(!0)):l+s>c-e?(I(!0),S(!1)):l+e>0&&l<c-e&&(I(!0),S(!0))}(t)}p.current=null==i?void 0:i.map(((e,n)=>{var o,a;return null!==(o=null==p||null===(a=p.current)||void 0===a?void 0:a[n])&&void 0!==o?o:t()}));const P=Oe((e=>{var n;n=e,O.track("gallery.interaction",{elementid:"nav",interactiontype:n}),Ae.send("interaction",{elementid:"nav",interactiontype:n})}),200);const T=a((e=>{l({index:e,step:0,source:"nav"})}),[]);return r((()=>{var e;f(null===(e=p.current)||void 0===e?void 0:e[s])}),[s]),r((()=>{if(null!=y&&y.current&&null!=k&&k.current){const e=y.current,n=k.current.clientWidth/2,o=e.clientWidth/2,t=k.current.clientHeight/2,a=e.clientHeight/2;k.current.scrollTo({left:e.offsetLeft-n+o,top:e.offsetTop-t+a,behavior:"smooth"})}}),[y]),r((()=>{D()}),[]),r((()=>(window.addEventListener("resize",D),()=>{window.removeEventListener("resize",D)})),[v,d,u]),r((()=>{x(0),D()}),[i,v,d,u]),r((()=>{j();const e=new ResizeObserver(j);return e.observe(k.current),()=>{e.disconnect()}}),[i,u,b]),e.createElement("div",{className:"eko-nav-container",ref:v,style:{opacity:w>0?1:0,height:""+(w&&b?w+"px":"auto")}},e.createElement(qe,{layout:c,nav:k,isVerticalNav:b,showPrevArrow:E,showNextArrow:M}),e.createElement("ul",{className:`eko-nav eko-mobile-nav-selected-${null!==(C=null==c||null===(A=c.mobile)||void 0===A||null===(A=A.config)||void 0===A?void 0:A.navItemsSelectedType)&&void 0!==C?C:"underline"} eko-desktop-nav-selected-${null!==($=null==c||null===(q=c.desktop)||void 0===q||null===(q=q.config)||void 0===q?void 0:q.navItemsSelectedType)&&void 0!==$?$:"underline"}`,ref:k,onScroll:function(){j()},onWheel:function(){P("wheel")},onTouchMove:function(){P("swipe")}},null==i?void 0:i.map(((n,o)=>{var t;const a=(null==n||null===(t=n.media)||void 0===t?void 0:t.url)||(null==n?void 0:n.media)||"";return e.createElement($e,{key:a+o,index:o,activeIndex:s,setActiveIndex:T,item:n,src:a,navItemRefs:p,itemIcon:null==n?void 0:n.icon})}))));var C,A,$,q};Re.propTypes={items:Me.array.isRequired,activeIndex:Me.number,setActiveIndex:Me.func.isRequired,layout:Me.object,carouselMounted:Me.bool,forceMobile:Me.bool};function Ne(){O.track("gallery.cover.displayed"),Ae.send("gallerycoverdisplayed")}function Be(e){if(!e)return e;try{const n=new URL(e);return n.host.includes("assets.eko.com")&&n.pathname.startsWith("/image")&&!n.searchParams.has("width")?(n.pathname.endsWith(".png")&&(n.pathname=n.pathname.replace(/\.png$/,".webp")),n.searchParams.set("width",1920),n.toString()):e}catch(n){return e}}const _e=({item:o,src:t,srcset:a,sizes:i,isCoverElement:l})=>{const s=n(null);return r((()=>{var e;if(l){if(null===(e=s.current)||void 0===e||!e.complete)return s.current.addEventListener("load",Ne,{once:!0}),()=>{var e;null===(e=s.current)||void 0===e||e.removeEventListener("load",Ne,{once:!0})};Ne()}}),[]),e.createElement("img",{ref:s,src:Be(t),srcSet:a,sizes:i,alt:o.name,fetchPriority:l?"high":"auto",loading:l?"eager":"lazy",style:{width:"100%",height:"100%"}})};_e.propTypes={item:Me.object.isRequired,src:Me.string,srcset:Me.string,sizes:Me.string,isCoverElement:Me.bool};const ze=Oe((e=>{var n;n=e,O.track("gallery.interaction",{elementid:"carousel",interactiontype:n}),Ae.send("interaction",{elementid:"carousel",interactiontype:n})}),200);function Le(){ze("wheel")}const Fe=i((({items:a,setActiveIndex:i,activeIndex:s,showSmartLoaders:c},d)=>{const u=n(null),k=n([]);k.current=null==a?void 0:a.map(((e,n)=>{var o,a;return null!==(o=null==k||null===(a=k.current)||void 0===a?void 0:a[n])&&void 0!==o?o:t()}));const[v,p]=o(),[m,g]=o(),y=n(s),f=n(!1);function b(){const e=function(e){const n=e.scrollLeft,o=e.scrollWidth-e.clientWidth;return 0===n?0:n>o?100:n/o*100}(u.current)*(null==a?void 0:a.length)/100,n=Math.min(Math.trunc(e),(null==a?void 0:a.length)-1),o=y.current;"nav"!==o.source&&"external-nav"!==o.source?(f.current&&n!==o.index&&(f.current=!1),f.current||(n>(null==a?void 0:a.length)-1?i({index:(null==a?void 0:a.length)-1,source:"carousel"}):i({index:n,source:"carousel"}))):n===o.index?f.current=!0:f.current&&n!==o.index&&(f.current=!1,i({index:n,source:"carousel"}))}return l(d,(()=>({prev:()=>{i({index:Math.max(0,y.current.index-1),source:"carousel"})},next:()=>{i({index:Math.min((null==a?void 0:a.length)-1,y.current.index+1),source:"carousel"})}}))),r((()=>{const e=u.current;if(e)return e.addEventListener("scroll",b),()=>{e.removeEventListener("scroll",b)}}),[a]),r((()=>{var e;let n=null===(e=k.current)||void 0===e?void 0:e[s.index];if(n&&("nav"===s.source||"external-nav"===s.source)){const e=n.current,o=u.current.clientWidth/2,t=(null==e?void 0:e.clientWidth)/2,a=(null==e?void 0:e.offsetLeft)-o+t;u.current.scrollTo({left:a,behavior:"smooth"})}}),[s]),r((()=>{y.current=s,"nav"!==s.source&&"external-nav"!==s.source||(f.current=!1)}),[s]),e.createElement("ul",{className:"eko-carousel",ref:u,onScroll:b,onWheel:Le,onTouchMove:function(e){g(e.targetTouches[0].clientX)},onTouchStart:function(e){p(e.targetTouches[0].clientX),g(null)},onTouchEnd:function(){m&&v&&(v-m>75||v-m<-75)&&ze("swipe")}},null==a?void 0:a.map(((n,o)=>{const t=(null==n?void 0:n.cover)||(null==n?void 0:n.media),a=(null==t?void 0:t.url)||t;return e.createElement("li",{className:"eko-carousel-item",key:a+o,ref:k.current[o]},e.createElement(_e,{item:n,src:a,srcset:null==t?void 0:t.srcset,sizes:null==t?void 0:t.sizes,isCoverElement:0===o}),c&&"image"!==n.type&&e.createElement("div",{className:"eko-smart-loading"},e.createElement("div",null),e.createElement("p",null,"Loading video experience")))})))}));function We(e){var n;return function(e){var n;return"eko.block.event"===(null==e||null===(n=e.data)||void 0===n?void 0:n.type)}(e)&&"GalleryBlock"===(null==e||null===(n=e.data)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.blockType)}Fe.propTypes={items:Me.array.isRequired,setActiveIndex:Me.func.isRequired,activeIndex:Me.object,showSmartLoaders:Me.bool},Fe.displayName="CarouselLoop";const Ge="eko.project.invoke",Ve="eko.block.invoke";function He(e,n,o){var t;null!=e&&e.contentWindow&&(null==e||null===(t=e.contentWindow)||void 0===t||t.postMessage({target:"eko.embedapi",type:n,data:o},"*"))}function Ue(e){return`#variantId=${encodeURIComponent(e)}`}const Ye=i((({config:t,instanceId:a,setActiveItem:i,activeItem:s,variantId:c,smartGalleryLoaded:d,onLoad:u,forceMobile:k},v)=>{var p,g,y;const f=null!==(p=null===(g=t.options)||void 0===g?void 0:g.galleryEnv)&&void 0!==p?p:"",b=null===(y=t.__autoGenerated)||void 0===y||null===(y=y.publishItem)||void 0===y?void 0:y.id,h=function(e={}){let n="";return Object.entries(e).forEach((([e,o])=>{n+=`&${e}=${o}`})),n}(null==t?void 0:t.qp),w=function(e,n,o){return`https://${e}play.eko.com/embed?${o?`id=${o}`:`piid=${n}`}&nocover=true&galleryBlockMode=gallery&eko_pixel=true`}(f,b,a),x=n(null),E=n(null),I=n(!1),[M,S]=o(Ue(c||"ekonovar")),[D,j]=o(w+h+M);let P;function T(){O.track("gallery.project.display"),u(),Ae.send("galleryloaded")}return l(v,(()=>({prev:()=>{He(null==E?void 0:E.current,Ve,{action:"onPrevModule"})},next:()=>{He(null==E?void 0:E.current,Ve,{action:"onNextModule"})}}))),r((()=>{I.current?He(null==E?void 0:E.current,Ge,{action:"updateVariant",args:{id:c}}):S(Ue(c))}),[c]),r((()=>{He(null==E?void 0:E.current,Ve,{action:"updateActiveModule",args:{activeItemIndex:null==s?void 0:s.index,activeModuleIndex:null==s?void 0:s.step}})}),[s]),r((()=>{function e(e){if((function(e){var n;return"eko.project.blockstart"===(null==e||null===(n=e.data)||void 0===n?void 0:n.type)}(e)||function(e){var n,o;return"eko.project.started"===(null==e||null===(n=e.data)||void 0===n?void 0:n.type)&&(null==e||null===(o=e.data)||void 0===o||null===(o=o.data)||void 0===o?void 0:o.started)}(e))&&!I.current)return n=e.data.data.blockType,I.current=!0,void("GalleryBlock"===n?He(null==E?void 0:E.current,Ve,{action:"updateActiveModule",args:{activeItemIndex:null==s?void 0:s.index,activeModuleIndex:null==s?void 0:s.step}}):T());var n;if(I.current){if(function(e){var n;return We(e)&&"activeModuleChanged"===(null==e||null===(n=e.data)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.name)}(e))return void function(e){const n=e.data.data.data.activeItemIndex,o=e.data.data.data.activeModuleIndex;n===(null==s?void 0:s.index)&&o===(null==s?void 0:s.step)||i({index:n,step:o,source:"carousel"})}(e);(function(e){var n;return We(e)&&"activeModuleChangeDone"===(null==e||null===(n=e.data)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.name)})(e)&&!d&&T()}}return P=k||m()?"mobile":"desktop",function(e,n={}){window.addEventListener("message",e,n)}(e),()=>{!function(e,n={}){window.removeEventListener("message",e,n)}(e)}}),[s]),r((()=>{I.current||He(null==E?void 0:E.current,Ge,{action:"queryProjectStarted"})}),[s,d]),r((()=>{I.current=!1}),[t]),r((()=>{j(w+h+M)}),[M]),e.createElement("div",{className:"eko-smart-gallery-container "+(d?"":"eko-project-not-ready"),ref:x,"data-type":"smart-gallery","data-qp":h,"data-variant":c,"data-device":P},e.createElement("iframe",{allow:"autoplay; fullscreen",title:"eko gallery",src:D,style:{border:0},ref:E}))}));Ye.propTypes={config:Me.object.isRequired,instanceId:Me.string,setActiveItem:Me.func.isRequired,activeItem:Me.object.isRequired,variantId:Me.string,smartGalleryLoaded:Me.bool,onLoad:Me.func,forceMobile:Me.bool},Ye.displayName="SmartGallery";const Qe=()=>e.createElement("style",{suppressHydrationWarning:!0},'.eko-gallery {\n --accentColorEko: #000;\n --primaryColorEko: #000;\n --backgroundColorEko: #25D7A2;\n --navItemsBackgroundColorEko: transparent;\n --navItemsBannerBackgroundColorEko: #EEEEEE;\n --carouselItemsBackgroundColorEko: transparent;\n --carouselInteractiveCoverBackgroundColorEko: transparent;\n --galleryGapEkoMobile: 12px;\n --galleryGapEkoDesktop: 12px;\n --galleryPaddingEkoMobile: 0;\n --galleryPaddingEkoDesktop: 0;\n --galleryMaxWidthEkoMobile: 100%;\n --galleryMaxWidthEkoDesktop: 900px;\n --galleryTransition: .8s cubic-bezier(.35, 0, 0, 1) 1.5s;\n --navBarPaddingEkoMobile: 0 0 0 20px;\n --navBarPaddingEkoDesktop: 0;\n --navItemsWidthEkoMobile: 80px;\n --navItemsWidthEkoDesktop: 80px;\n --navItemsHeightEkoMobile: 80px;\n --navItemsHeightEkoDesktop: 80px;\n --navItemsGapEkoMobile: 14px;\n --navItemsGapEkoDesktop: 14px;\n --navItemsRadiusEkoMobile: 8px;\n --navItemsRadiusEkoDesktop: 8px;\n --navItemsSelectedMarginEkoMobile: 3px;\n --navItemsSelectedMarginEkoDesktop: 3px;\n --navItemsSelectedThicknessEkoMobile: 3px;\n --navItemsSelectedThicknessEkoDesktop: 3px;\n --navItemsSelectedUnderlineRadiusEkoMobile: 100px;\n --navItemsSelectedUnderlineRadiusEkoDesktop: 100px;\n --navItemsObjectFitEkoMobile: cover;\n --navItemsObjectFitEkoDesktop: cover;\n --navMediaBadgeSizeEkoMobile: 22px;\n --navMediaBadgeSizeEkoDesktop: 22px;\n --navMediaBadgeMarginTopEkoMobile: 4px;\n --navMediaBadgeMarginTopEkoDesktop: 4px;\n --navMediaBadgeMarginRightEkoMobile: 4px;\n --navMediaBadgeMarginRightEkoDesktop: 4px;\n --carouselItemsAspectRatioEkoMobile: 1 / 1;\n --carouselItemsAspectRatioEkoDesktop: 1 / 1;\n --carouselItemsRadiusEkoMobile: 0px;\n --carouselItemsRadiusEkoDesktop: 12px;\n --carouselItemsObjectFitEkoMobile: cover;\n --carouselItemsObjectFitEkoDesktop: cover;\n --navBannerFontSizeEkoMobile: 12px;\n --navBannerFontSizeEkoDesktop: 12px;\n --navBannerFontLineHeightEkoMobile: 120%;\n --navBannerFontLineHeightEkoDesktop: 120%;\n --navBannerFontFamilyEkoMobile: inherit;\n --navBannerFontFamilyEkoDesktop: inherit;\n --navBannerFontWeightEkoMobile: 400;\n --navBannerFontWeightEkoDesktop: 400;\n --outerWidth: 0\n}\n\n.eko-gallery * {\n box-sizing: border-box\n}\n\n.eko-gallery ul,\n.eko-gallery li {\n padding: 0;\n text-indent: 0;\n list-style-type: none;\n font-size: 0;\n margin: 0\n}\n\n.eko-gallery button {\n border: none;\n padding: 0\n}\n\n.eko-gallery .eko-hidden {\n display: none !important\n}\n\n.eko-gallery .eko-not-visible {\n visibility: hidden !important\n}\n\n.eko-hidden-variant {\n display: none !important\n}\n\n.eko-sr-only {\n width: 1px;\n height: 1px;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n margin: -1px;\n padding: 0;\n position: absolute;\n overflow: hidden\n}\n\n.eko-sticky-top {\n position: sticky;\n top: 0\n}\n\n.eko-gallery .eko-nav {\n height: 100%;\n display: flex;\n align-items: start;\n align-self: start;\n flex-shrink: 0;\n scrollbar-width: none;\n -ms-overflow-style: none\n}\n\n.eko-gallery .eko-nav li {\n font-size: 0;\n position: relative;\n display: flex;\n flex-shrink: 0;\n justify-content: center;\n -webkit-box-pack: center;\n cursor: pointer\n}\n\n.eko-gallery .eko-nav li button {\n position: relative;\n background-color: transparent;\n border-radius: 0;\n line-height: 0;\n overflow: hidden;\n cursor: pointer\n}\n\n.eko-gallery .eko-nav li button img {\n background-color: var(--navItemsBackgroundColorEko);\n pointer-events: none\n}\n\n.eko-gallery .eko-nav li button .item-icon {\n position: absolute;\n top: 0;\n right: 0;\n width: 32px;\n height: 32px;\n transform: scale(.25);\n transform-origin: top right\n}\n\n.eko-gallery .eko-nav li button .item-icon span {\n display: block;\n width: 400%;\n height: 400%;\n position: absolute;\n top: 0;\n right: 0;\n background-position: top right;\n background-repeat: no-repeat;\n background-size: contain\n}\n\n.eko-gallery .eko-nav li .addons-container {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n flex-direction: column;\n font-size: 10px;\n line-height: 100%\n}\n\n.eko-gallery .eko-nav li .addons-container .thumb-label {\n width: 100%;\n background: var(--navItemsBannerBackgroundColorEko);\n padding: 4px;\n text-align: center;\n text-wrap: balance;\n color: var(--primaryColorEko)\n}\n\n.eko-gallery .eko-nav li .addons-container .step-indicator {\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: center;\n gap: 5px;\n padding: 6px\n}\n\n.eko-gallery .eko-nav li .addons-container .step-indicator span {\n width: 5px;\n height: 5px;\n border-radius: 100px;\n background: #fff;\n box-shadow: 0 0 3px #00000094\n}\n\n.eko-gallery .eko-nav li .addons-container.full-thumb-label {\n position: relative\n}\n\n.eko-gallery .eko-nav li .addons-container.full-thumb-label .step-indicator {\n position: absolute;\n bottom: 0\n}\n\n.eko-gallery .eko-nav li .addons-container.full-thumb-label .thumb-label {\n align-content: center\n}\n\n.eko-gallery .eko-nav::-webkit-scrollbar {\n display: none\n}\n\n.eko-nav-container {\n display: flex\n}\n\n.eko-nav-container:has(.eko-nav.eko-not-visible) .eko-nav-arrow {\n display: none\n}\n\n.eko-nav-container {\n position: relative;\n opacity: 0;\n transition: opacity .15s ease-in\n}\n\n.eko-nav-container .eko-nav-arrow {\n width: 28px;\n height: 28px;\n position: absolute;\n display: none;\n justify-content: center;\n align-items: center;\n border-radius: 28px;\n background-color: #fff;\n box-shadow: 0 0 6px #0000001f;\n z-index: 1;\n bottom: 50%;\n opacity: 1;\n transition: opacity .15s ease-in;\n transform: translateY(50%);\n cursor: pointer\n}\n\n.eko-nav-container .eko-nav-arrow.eko-prev-nav-button svg,\n.eko-nav-container .eko-nav-arrow.eko-next-nav-button svg {\n padding: 1px\n}\n\n.eko-nav-container .eko-nav-arrow.eko-prev-nav-button {\n left: 8px\n}\n\n.eko-nav-container .eko-nav-arrow.eko-next-nav-button {\n right: 8px\n}\n\n.eko-nav-container .eko-nav-arrow.eko-hidden-nav-button {\n opacity: 0;\n pointer-events: none\n}\n\n.eko-gallery .eko-nav {\n gap: var(--navItemsGapEkoMobile);\n padding: var(--navBarPaddingEkoMobile)\n}\n\n.eko-gallery .eko-nav li button img {\n width: var(--navItemsWidthEkoMobile);\n height: v