@ordergroove/offers 2.40.1-alpha-PR-1079-1.0 → 2.40.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@
4
4
  │ └ examples/index.js
5
5
  └ examples/index.js ───────────────────────────────────────── 9.7kb ─── 3.5%
6
6
 
7
- dist/offers.js ───────────────────────────────────────────── 148.7kb ─ 100.0%
7
+ dist/offers.js ───────────────────────────────────────────── 148.5kb ─ 100.0%
8
8
  ├ src/components/Offer.js ─────────────────────────────────── 9.1kb ─── 6.1%
9
9
  │ └ src/make-api.js
10
10
  │ └ src/index.js
@@ -181,9 +181,6 @@
181
181
  │ └ src/index.js
182
182
  ├ src/core/experiments.js ─────────────────────────────────── 953b ──── 0.6%
183
183
  │ └ src/index.js
184
- ├ src/core/localStorage.js ────────────────────────────────── 949b ──── 0.6%
185
- │ └ src/core/store.js
186
- │ └ src/index.js
187
184
  ├ src/core/middleware.js ──────────────────────────────────── 939b ──── 0.6%
188
185
  │ └ src/core/store.js
189
186
  │ └ src/index.js
@@ -200,6 +197,9 @@
200
197
  ├ src/components/Text.js ──────────────────────────────────── 858b ──── 0.6%
201
198
  │ └ src/make-api.js
202
199
  │ └ src/index.js
200
+ ├ src/core/localStorage.js ────────────────────────────────── 802b ──── 0.5%
201
+ │ └ src/core/store.js
202
+ │ └ src/index.js
203
203
  ├ src/core/connect.js ─────────────────────────────────────── 794b ──── 0.5%
204
204
  │ └ src/make-api.js
205
205
  │ └ src/index.js
package/dist/offers.js CHANGED
@@ -8,7 +8,7 @@ else {
8
8
  window.og['offers'] = factory();
9
9
  }
10
10
  })(()=>{
11
- var lib=(()=>{var Ia=Object.create;var dt=Object.defineProperty;var ka=Object.getOwnPropertyDescriptor;var qa=Object.getOwnPropertyNames;var Da=Object.getPrototypeOf,Fa=Object.prototype.hasOwnProperty;var n=(t,e)=>dt(t,"name",{value:e,configurable:!0});var J=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Rn=(t,e)=>{for(var r in e)dt(t,r,{get:e[r],enumerable:!0})},An=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of qa(e))!Fa.call(t,i)&&i!==r&&dt(t,i,{get:()=>e[i],enumerable:!(o=ka(e,i))||o.enumerable});return t};var se=(t,e,r)=>(r=t!=null?Ia(Da(t)):{},An(e||!t||!t.__esModule?dt(r,"default",{value:t,enumerable:!0}):r,t)),Ua=t=>An(dt({},"__esModule",{value:!0}),t);var jt=J((Vt,Ln)=>{(function(t,e){typeof Vt=="object"&&typeof Ln<"u"?e(Vt):typeof define=="function"&&define.amd?define(["exports"],e):(t=t||self,e(t.throttleDebounce={}))})(Vt,function(t){"use strict";function e(o,i,s,a){var c,l=!1,p=0;function d(){c&&clearTimeout(c)}n(d,"clearExistingTimeout");function u(){d(),l=!0}n(u,"cancel"),typeof i!="boolean"&&(a=s,s=i,i=void 0);function h(){for(var _=arguments.length,S=new Array(_),m=0;m<_;m++)S[m]=arguments[m];var b=this,T=Date.now()-p;if(l)return;function E(){p=Date.now(),s.apply(b,S)}n(E,"exec");function w(){c=void 0}n(w,"clear"),a&&!c&&E(),d(),a===void 0&&T>o?E():i!==!0&&(c=setTimeout(a?w:E,a===void 0?o-T:o))}return n(h,"wrapper"),h.cancel=u,h}n(e,"throttle");function r(o,i,s){return s===void 0?e(o,i,!1):e(o,s,i!==!1)}n(r,"debounce"),t.debounce=r,t.throttle=e,Object.defineProperty(t,"__esModule",{value:!0})})});var _t=J((Vu,ii)=>{var Wa="Expected a function",Xn="__lodash_hash_undefined__",Ja="[object Function]",Ka="[object GeneratorFunction]",Qa=/[\\^$.*+?()[\]{}|]/g,Za=/^\[object .+?Constructor\]$/,Xa=typeof window=="object"&&window&&window.Object===Object&&window,ec=typeof self=="object"&&self&&self.Object===Object&&self,ei=Xa||ec||Function("return this")();function tc(t,e){return t?.[e]}n(tc,"getValue");function rc(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}n(rc,"isHostObject");var oc=Array.prototype,nc=Function.prototype,ti=Object.prototype,so=ei["__core-js_shared__"],Zn=function(){var t=/[^.]+$/.exec(so&&so.keys&&so.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),ri=nc.toString,ao=ti.hasOwnProperty,ic=ti.toString,sc=RegExp("^"+ri.call(ao).replace(Qa,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ac=oc.splice,cc=oi(ei,"Map"),bt=oi(Object,"create");function we(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}n(we,"Hash");function lc(){this.__data__=bt?bt(null):{}}n(lc,"hashClear");function pc(t){return this.has(t)&&delete this.__data__[t]}n(pc,"hashDelete");function uc(t){var e=this.__data__;if(bt){var r=e[t];return r===Xn?void 0:r}return ao.call(e,t)?e[t]:void 0}n(uc,"hashGet");function dc(t){var e=this.__data__;return bt?e[t]!==void 0:ao.call(e,t)}n(dc,"hashHas");function fc(t,e){var r=this.__data__;return r[t]=bt&&e===void 0?Xn:e,this}n(fc,"hashSet");we.prototype.clear=lc;we.prototype.delete=pc;we.prototype.get=uc;we.prototype.has=dc;we.prototype.set=fc;function ze(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}n(ze,"ListCache");function hc(){this.__data__=[]}n(hc,"listCacheClear");function mc(t){var e=this.__data__,r=nr(e,t);if(r<0)return!1;var o=e.length-1;return r==o?e.pop():ac.call(e,r,1),!0}n(mc,"listCacheDelete");function gc(t){var e=this.__data__,r=nr(e,t);return r<0?void 0:e[r][1]}n(gc,"listCacheGet");function yc(t){return nr(this.__data__,t)>-1}n(yc,"listCacheHas");function bc(t,e){var r=this.__data__,o=nr(r,t);return o<0?r.push([t,e]):r[o][1]=e,this}n(bc,"listCacheSet");ze.prototype.clear=hc;ze.prototype.delete=mc;ze.prototype.get=gc;ze.prototype.has=yc;ze.prototype.set=bc;function Ce(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}n(Ce,"MapCache");function _c(){this.__data__={hash:new we,map:new(cc||ze),string:new we}}n(_c,"mapCacheClear");function Sc(t){return ir(this,t).delete(t)}n(Sc,"mapCacheDelete");function Ec(t){return ir(this,t).get(t)}n(Ec,"mapCacheGet");function xc(t){return ir(this,t).has(t)}n(xc,"mapCacheHas");function vc(t,e){return ir(this,t).set(t,e),this}n(vc,"mapCacheSet");Ce.prototype.clear=_c;Ce.prototype.delete=Sc;Ce.prototype.get=Ec;Ce.prototype.has=xc;Ce.prototype.set=vc;function nr(t,e){for(var r=t.length;r--;)if(Cc(t[r][0],e))return r;return-1}n(nr,"assocIndexOf");function Oc(t){if(!ni(t)||Pc(t))return!1;var e=Rc(t)||rc(t)?sc:Za;return e.test(wc(t))}n(Oc,"baseIsNative");function ir(t,e){var r=t.__data__;return Tc(e)?r[typeof e=="string"?"string":"hash"]:r.map}n(ir,"getMapData");function oi(t,e){var r=tc(t,e);return Oc(r)?r:void 0}n(oi,"getNative");function Tc(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}n(Tc,"isKeyable");function Pc(t){return!!Zn&&Zn in t}n(Pc,"isMasked");function wc(t){if(t!=null){try{return ri.call(t)}catch{}try{return t+""}catch{}}return""}n(wc,"toSource");function co(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError(Wa);var r=n(function(){var o=arguments,i=e?e.apply(this,o):o[0],s=r.cache;if(s.has(i))return s.get(i);var a=t.apply(this,o);return r.cache=s.set(i,a),a},"memoized");return r.cache=new(co.Cache||Ce),r}n(co,"memoize");co.Cache=Ce;function Cc(t,e){return t===e||t!==t&&e!==e}n(Cc,"eq");function Rc(t){var e=ni(t)?ic.call(t):"";return e==Ja||e==Ka}n(Rc,"isFunction");function ni(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}n(ni,"isObject");ii.exports=co});var vr=J((If,cs)=>{var El={PAR_OPEN:"(".charCodeAt(0),PAR_CLOSE:")".charCodeAt(0),OP_NOT:"!".charCodeAt(0),BINARY_AND:"&".charCodeAt(0),BINARY_OR:"|".charCodeAt(0),LITERAL:"LITERAL",END:"END",LEAF:"LEAF",ATOMIC:"ATOMIC"};cs.exports=El});var ps=J((kf,ls)=>{var qe=vr(),xl=n(t=>{let e="",r=[];for(let o of t){let i=o.charCodeAt(0);switch(i){case qe.PAR_OPEN:case qe.PAR_CLOSE:case qe.OP_NOT:case qe.BINARY_AND:case qe.BINARY_OR:e&&(r.push({type:qe.LITERAL,value:e}),e=""),r.push({type:i,value:o});break;default:e+=o}}return e&&r.push({type:qe.LITERAL,value:e}),r},"Tokenizer");ls.exports=xl});var ds=J((qf,us)=>{var Se=vr(),vl=n(t=>{let e=[],r=[];return t.forEach(i=>{switch(i.type){case Se.LITERAL:e.unshift(i);break;case Se.BINARY_AND:case Se.BINARY_OR:case Se.OP_NOT:case Se.PAR_OPEN:r.push(i);break;case Se.PAR_CLOSE:for(;r.length&&r[r.length-1].type!==Se.PAR_OPEN;)e.unshift(r.pop());r.pop(),r.length&&r[r.length-1].type===Se.OP_NOT&&e.unshift(r.pop());break;default:break}}),r.length&&[...r.reverse(),...e]||e},"PolishNotation"),Ol=n(function*(t){for(let e=0;e<t.length-1;e++)yield t[e];return t[t.length-1]},"PolishGenerator");us.exports={PolishNotation:vl,PolishGenerator:Ol}});var hs=J((Df,fs)=>{var F=vr(),V=class{constructor(e,r,o,i){this.op=e,this.left=r,this.right=o,this.literal=i}isLeaf(){return this.op===F.LEAF}isAtomic(){return this.isLeaf()||this.op===F.OP_NOT&&this.left.isLeaf()}getLiteralValue(){return this.literal}static CreateAnd(e,r){return new V(F.BINARY_AND,e,r)}static CreateNot(e){return new V(F.OP_NOT,e)}static CreateOr(e,r){return new V(F.BINARY_OR,e,r)}static CreateLiteral(e){return new V(F.LEAF,null,null,e)}};n(V,"ExpNode");var st=n(t=>{let e=t.next().value;switch(e.type){case F.LITERAL:return V.CreateLiteral(e.value);case F.OP_NOT:return V.CreateNot(st(t));case F.BINARY_AND:{let r=st(t),o=st(t);return V.CreateAnd(r,o)}case F.BINARY_OR:{let r=st(t),o=st(t);return V.CreateOr(r,o)}}return null},"make"),at=n((t,e)=>{if(t.isLeaf())return e(t.getLiteralValue());if(t.op===F.OP_NOT)return!at(t.left,e);if(t.op===F.BINARY_OR)return at(t.left,e)||at(t.right,e);if(t.op===F.BINARY_AND)return at(t.left,e)&&at(t.right,e)},"nodeEvaluator");fs.exports={make:st,nodeEvaluator:at}});var bs=J((Ff,ys)=>{var Tl=ps(),ms=ds(),gs=hs(),Pl=n((t,e)=>{let r=Tl(t),o=ms.PolishNotation(r),i=ms.PolishGenerator(o),s=gs.make(i);return gs.nodeEvaluator(s,e)},"parse");ys.exports={parse:Pl}});var ta=J((kg,Jo)=>{function cp(t,e){var r,o,i,s,a,c,l,p,d,u;for(r=t.length&3,o=t.length-r,i=e,a=3432918353,l=461845907,u=0;u<o;)d=t.charCodeAt(u)&255|(t.charCodeAt(++u)&255)<<8|(t.charCodeAt(++u)&255)<<16|(t.charCodeAt(++u)&255)<<24,++u,d=(d&65535)*a+(((d>>>16)*a&65535)<<16)&4294967295,d=d<<15|d>>>17,d=(d&65535)*l+(((d>>>16)*l&65535)<<16)&4294967295,i^=d,i=i<<13|i>>>19,s=(i&65535)*5+(((i>>>16)*5&65535)<<16)&4294967295,i=(s&65535)+27492+(((s>>>16)+58964&65535)<<16);switch(d=0,r){case 3:d^=(t.charCodeAt(u+2)&255)<<16;case 2:d^=(t.charCodeAt(u+1)&255)<<8;case 1:d^=t.charCodeAt(u)&255,d=(d&65535)*a+(((d>>>16)*a&65535)<<16)&4294967295,d=d<<15|d>>>17,d=(d&65535)*l+(((d>>>16)*l&65535)<<16)&4294967295,i^=d}return i^=t.length,i^=i>>>16,i=(i&65535)*2246822507+(((i>>>16)*2246822507&65535)<<16)&4294967295,i^=i>>>13,i=(i&65535)*3266489909+(((i>>>16)*3266489909&65535)<<16)&4294967295,i^=i>>>16,i>>>0}n(cp,"murmurhash3_32_gc");typeof Jo<"u"&&(Jo.exports=cp)});var ra=J((qg,Ko)=>{function lp(t,e){for(var r=t.length,o=e^r,i=0,s;r>=4;)s=t.charCodeAt(i)&255|(t.charCodeAt(++i)&255)<<8|(t.charCodeAt(++i)&255)<<16|(t.charCodeAt(++i)&255)<<24,s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16),s^=s>>>24,s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16),o=(o&65535)*1540483477+(((o>>>16)*1540483477&65535)<<16)^s,r-=4,++i;switch(r){case 3:o^=(t.charCodeAt(i+2)&255)<<16;case 2:o^=(t.charCodeAt(i+1)&255)<<8;case 1:o^=t.charCodeAt(i)&255,o=(o&65535)*1540483477+(((o>>>16)*1540483477&65535)<<16)}return o^=o>>>13,o=(o&65535)*1540483477+(((o>>>16)*1540483477&65535)<<16),o^=o>>>15,o>>>0}n(lp,"murmurhash2_32_gc");typeof Ko!==void 0&&(Ko.exports=lp)});var na=J((Dg,Gr)=>{var oa=ta(),pp=ra();Gr.exports=oa;Gr.exports.murmur3=oa;Gr.exports.murmur2=pp});var Iu={};Rn(Iu,{addOptinChangedCallback:()=>pu,addTemplate:()=>uu,autoInit:()=>Au,clear:()=>du,config:()=>fu,default:()=>Nu,disableOptinChangedCallbacks:()=>hu,getOptins:()=>mu,getProductsForPurchasePost:()=>gu,initialize:()=>yu,isReady:()=>lu,offers:()=>O,platform:()=>q,previewMode:()=>bu,register:()=>_u,resolveSettings:()=>Su,setAuthUrl:()=>Eu,setEnvironment:()=>xu,setLocale:()=>vu,setMerchantId:()=>Ou,setPublicPath:()=>Tu,setTemplates:()=>Pu,setupCart:()=>wu,setupProduct:()=>Cu,setupProducts:()=>Ru,store:()=>Aa});function Xr(t){var e,r=t.Symbol;return typeof r=="function"?r.observable?e=r.observable:(e=r("observable"),r.observable=e):e="@@observable",e}n(Xr,"symbolObservablePonyfill");var Ue;typeof self<"u"?Ue=self:typeof window<"u"||typeof window<"u"?Ue=window:typeof module<"u"?Ue=module:Ue=Function("return this")();var La=Xr(Ue),eo=La;var to=n(function(){return Math.random().toString(36).substring(7).split("").join(".")},"randomString"),ft={INIT:"@@redux/INIT"+to(),REPLACE:"@@redux/REPLACE"+to(),PROBE_UNKNOWN_ACTION:n(function(){return"@@redux/PROBE_UNKNOWN_ACTION"+to()},"PROBE_UNKNOWN_ACTION")};function Ma(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}n(Ma,"isPlainObject");function ro(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error("Expected the enhancer to be a function.");return r(ro)(t,e)}if(typeof t!="function")throw new Error("Expected the reducer to be a function.");var i=t,s=e,a=[],c=a,l=!1;function p(){c===a&&(c=a.slice())}n(p,"ensureCanMutateNextListeners");function d(){if(l)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return s}n(d,"getState");function u(m){if(typeof m!="function")throw new Error("Expected the listener to be a function.");if(l)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var b=!0;return p(),c.push(m),n(function(){if(!!b){if(l)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");b=!1,p();var E=c.indexOf(m);c.splice(E,1),a=null}},"unsubscribe")}n(u,"subscribe");function h(m){if(!Ma(m))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(typeof m.type>"u")throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(l)throw new Error("Reducers may not dispatch actions.");try{l=!0,s=i(s,m)}finally{l=!1}for(var b=a=c,T=0;T<b.length;T++){var E=b[T];E()}return m}n(h,"dispatch");function _(m){if(typeof m!="function")throw new Error("Expected the nextReducer to be a function.");i=m,h({type:ft.REPLACE})}n(_,"replaceReducer");function S(){var m,b=u;return m={subscribe:n(function(E){if(typeof E!="object"||E===null)throw new TypeError("Expected the observer to be an object.");function w(){E.next&&E.next(d())}n(w,"observeState"),w();var C=b(w);return{unsubscribe:C}},"subscribe")},m[eo]=function(){return this},m}return n(S,"observable"),h({type:ft.INIT}),o={dispatch:h,subscribe:u,getState:d,replaceReducer:_},o[eo]=S,o}n(ro,"createStore");function $a(t,e){var r=e&&e.type,o=r&&'action "'+String(r)+'"'||"an action";return"Given "+o+', reducer "'+t+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}n($a,"getUndefinedStateErrorMessage");function Va(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:ft.INIT});if(typeof o>"u")throw new Error('Reducer "'+e+`" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof r(void 0,{type:ft.PROBE_UNKNOWN_ACTION()})>"u")throw new Error('Reducer "'+e+'" returned undefined when probed with a random type. '+("Don't try to handle "+ft.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.")})}n(Va,"assertReducerShape");function $t(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var i=e[o];typeof t[i]=="function"&&(r[i]=t[i])}var s=Object.keys(r),a,c;try{Va(r)}catch(l){c=l}return n(function(p,d){if(p===void 0&&(p={}),c)throw c;if(!1)var u;for(var h=!1,_={},S=0;S<s.length;S++){var m=s[S],b=r[m],T=p[m],E=b(T,d);if(typeof E>"u"){var w=$a(m,d);throw new Error(w)}_[m]=E,h=h||E!==T}return h=h||s.length!==Object.keys(p).length,h?_:p},"combination")}n($t,"combineReducers");function Nn(t,e){return function(){return e(t.apply(this,arguments))}}n(Nn,"bindActionCreator");function kn(t,e){if(typeof t=="function")return Nn(t,e);if(typeof t!="object"||t===null)throw new Error("bindActionCreators expected an object or a function, instead received "+(t===null?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var r={};for(var o in t){var i=t[o];typeof i=="function"&&(r[o]=Nn(i,e))}return r}n(kn,"bindActionCreators");function ja(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}n(ja,"_defineProperty");function In(t,e){var r=Object.keys(t);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(t)),e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r}n(In,"ownKeys");function Ha(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?In(r,!0).forEach(function(o){ja(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):In(r).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}n(Ha,"_objectSpread2");function oo(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,i){return function(){return o(i.apply(void 0,arguments))}})}n(oo,"compose");function qn(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var i=o.apply(void 0,arguments),s=n(function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},"dispatch"),a={getState:i.getState,dispatch:n(function(){return s.apply(void 0,arguments)},"dispatch")},c=e.map(function(l){return l(a)});return s=oo.apply(void 0,c)(i.dispatch),Ha({},i,{dispatch:s})}}}n(qn,"applyMiddleware");function Dn(t){var e=n(function(o){var i=o.dispatch,s=o.getState;return function(a){return function(c){return typeof c=="function"?c(i,s,t):a(c)}}},"middleware");return e}n(Dn,"createThunkMiddleware");var Fn=Dn();Fn.withExtraArgument=Dn;var Un=Fn;var Ii=se(jt());var Mn=/^og_auth=/,Ga=n((t=Mn)=>(document.cookie.split(/;\s*/).find(e=>e.match(t))||"").replace(Mn,""),"c"),Ht=n(t=>{if(typeof t=="object")return t;let e=String(t||"").split("|");return e.length===3?{sig_field:e[0],ts:parseInt(e[1],10),sig:e[2]}:null},"r"),Ba=n(t=>new Promise((e,r)=>{let o=document.createElement("iframe");o.style.setProperty("display","none","important"),document.body.appendChild(o),o.onload=e,o.onerror=r,o.src=t}),"p"),za=n(t=>(t.headers.get("content-type")||"").indexOf("application/json")!==-1,"d");function $n(){return typeof window.og_auth<"u"?Ht(window.og_auth):null}n($n,"a");async function Ya(t=100){return new Promise(e=>{setTimeout(()=>e($n()),t)})}n(Ya,"f");async function Vn(t,e=Ga,r=Ba){let o;if(o=Ht($n())||Ht(e()),o)return o;if(t&&typeof t=="string"){let i=await fetch(t);i.status>=200&&i.status<300&&(o=e()||await(za(i)?i.json():Promise.resolve(r(t)).then(e)))}else o||(o=await Ya());if(o=Ht(o),o)return o;throw new Error("Unauthorized")}n(Vn,"u");var R="OPTIN_PRODUCT",I="OPTOUT_PRODUCT",k="PRODUCT_CHANGE_FREQUENCY",ae="PRODUCT_CHANGE_PREPAID_SHIPMENTS",Le="SET_MERCHANT_ID",K="REQUEST_OFFER",P="RECEIVE_OFFER",ht="PRODUCT_HAS_CHANGED",Me="CREATED_SESSION_ID",Gt="SET_AUTH_URL",jn="REQUEST_AUTH",Bt="AUTHORIZE",xe="UNAUTHORIZED",Hn="REQUEST_ORDERS",zt="RECEIVE_ORDERS",mt="CART_PRODUCT_KEY_HAS_CHANGED",Yt="RECEIVE_ORDER_ITEMS",Gn="FETCH_RESPONSE_ERROR",$e="SET_ENVIRONMENT_LOCAL",Ve="SET_ENVIRONMENT_STAGING",je="SET_ENVIRONMENT_DEV",He="SET_ENVIRONMENT_PROD",Bn="READY",zn="CONCLUDE_UPSELL",Yn="REQUEST_CREATE_IU_ORDER",Wt="CREATE_ONE_TIME",Wn="REQUEST_CONVERT_ONE_TIME",Jt="CONVERT_ONE_TIME";var Ge="CHECKOUT",Jn="RECEIVE_FETCH",Kt="SET_LOCALE",Be="SET_CONFIG",ue="SET_PREVIEW_STANDARD_OFFER",gt="SET_PREVIEW_UPSELL_OFFER",no="SET_PREVIEW_PREPAID_OFFER",Qt="ADD_TEMPLATE",Zt="SET_TEMPLATES",ve="LOCAL_STORAGE_CHANGE",de="LOCAL_STORAGE_CLEAR",Xt="SET_FIRST_ORDER_PLACE_DATE",er="SET_PRODUCT_TO_SUBSCRIBE",B="RECEIVE_PRODUCT_PLANS",Q="SETUP_PRODUCT",fe="SETUP_CART",ce="RECEIVE_MERCHANT_SETTINGS",io="SET_EXPERIMENT_VARIANT",Oe="pdp",Kn="local",tr="dev",Te="staging",Pe="prod",rr="static.ordergroove.com",or="staging.static.ordergroove.com",Qn="og-cart-updated";var sr=se(_t());var lo=n((...t)=>JSON.stringify(t),"memoizeKey"),St=n(t=>(...e)=>fetch(...t(...e)).then(r=>r.json()),"withFetchJson"),Et=n(t=>(e,...r)=>{if(!e)throw Error("host required");let[o,i={}]=t(...r);return[`${e.replace(/\/+$/,"")}${o}`,i]},"withHost"),ar=n(t=>(e,...r)=>{if(!e)throw Error("auth required");let[o,i={}]=t(...r);return[o,{...i,headers:{Authorization:JSON.stringify(e),...i.headers}}]},"withAuth"),si=n(t=>(...e)=>{let[r,o={}]=t(...e);return[r,{method:"POST",...o,body:JSON.stringify(o.body),headers:{"Content-type":"application/json",...o.headers}}]},"withJsonBody"),ai=n((t=[])=>(Array.isArray(t)?t:Object.entries(t)).map(([e,r])=>[e,encodeURIComponent(r)].join("=")).join("&"),"toQuery"),Ac=n(t=>JSON.stringify([].concat(t).map(e=>typeof e=="object"?e.id:e).filter(e=>e)),"toProductId"),Nc=(0,sr.default)(St(Et((t,e,r,o="pdp",i={})=>{var l;if(!t)throw Error("merchantId required");if(!e)throw Error("sessionId required");if(!r)throw Error("product required");let s=[["session_id",e],["page_type",1],["p",Ac(r)],["module_view",JSON.stringify(["regular"])]],{experiments:a}=i,c=(l=a==null?void 0:a.variants)==null?void 0:l.at(a.currentVariant);return c&&s.push(["variant",c.public_id]),[`/offer/${t}/${o}?${ai(s)}`]})),lo),Ic=(0,sr.default)(St(Et(ar((t=1,e="place")=>[`/orders/?${ai([["status",t],["ordering",e],["exclude_prepaid_orders","true"]])}`]))),lo),kc=(0,sr.default)(St(Et(ar(t=>{if(!t)throw Error("orderId required");return[`/items/?order=${t}`]}))),lo),qc=St(Et(ar(si((t,e,r,o)=>{if(!t)throw Error("product required");if(!e)throw Error("order required");if(!r)throw Error("quantity required");if(r<=0)throw Error("quantity must be greater or equal than one");if(!o)throw Error("offer required");return["/items/iu/",{body:{product:t,order:e,quantity:r,offer:o}}]})))),xt=n(t=>{if(typeof t=="object")return{...t};let[e,r]=(t||"").split(/_/).map(o=>parseInt(o,10));return e&&r&&{every:e,every_period:r}},"parseFrequency"),po=n(t=>t.match(/^\d+_\d$/),"isFrequencyValid"),Dc=n((t,e)=>String.prototype.localeCompare.call(t&&t.split("_").reverse().join("_"),e&&e.split("_").reverse().join("_")),"compareFrequencies"),ci=n(t=>[...new Set(t&&t.split(/\s+/))].filter(po).sort(Dc),"parseFrequenciesList");var vt=n(t=>{if(typeof t=="object"){let{every:e,period:r,every_period:o}=t;return`${e}_${r||o}`}return typeof t=="string"?t:""},"stringifyFrequency"),Fc=St(Et(ar(si((t,e,r,o)=>{if(!t)throw Error("item required");if(!e)throw Error("frequency required");let i=xt(e);if(!i)throw Error("invalid frequency");return["/subscriptions/create_from_item/",{body:{item:t.public_id,offer:r,session_id:o,...i}}]})))),he={fetchOffer:Nc,fetchOrders:Ic,fetchItems:kc,createOneTime:qc,convertOneTimeToSubscription:Fc};var uo=Ot(),q={shopify:typeof window.Shopify!="undefined",shopify_selling_plans:typeof(uo==null?void 0:uo.dataset.shopifySellingPlans)!="undefined"};function Uc(t,e){return t===e}n(Uc,"defaultEqualityCheck");function Lc(t,e,r){if(e===null||r===null||e.length!==r.length)return!1;for(var o=e.length,i=0;i<o;i++)if(!t(e[i],r[i]))return!1;return!0}n(Lc,"areArgumentsShallowlyEqual");function Mc(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Uc,r=null,o=null;return function(){return Lc(e,r,arguments)||(o=t.apply(null,arguments)),r=arguments,o}}n(Mc,"defaultMemoize");function $c(t){var e=Array.isArray(t[0])?t[0]:t;if(!e.every(function(o){return typeof o=="function"})){var r=e.map(function(o){return typeof o}).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, "+("instead received the following types: ["+r+"]"))}return e}n($c,"getDependencies");function Vc(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];return function(){for(var i=arguments.length,s=Array(i),a=0;a<i;a++)s[a]=arguments[a];var c=0,l=s.pop(),p=$c(s),d=t.apply(void 0,[function(){return c++,l.apply(null,arguments)}].concat(r)),u=t(function(){for(var h=[],_=p.length,S=0;S<_;S++)h.push(p[S].apply(null,arguments));return d.apply(null,h)});return u.resultFunc=l,u.dependencies=p,u.recomputations=function(){return c},u.resetRecomputations=function(){return c=0},u}}n(Vc,"createSelectorCreator");var Z=Vc(Mc);var z=se(_t());z.default.Cache=Map;function jc(t,e){if(t===e)return!0;if(t===null||e===null||t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0}n(jc,"arraysEqual");function Hc(t,e,r){let o=vt(r);return q.shopify_selling_plans?re(t,e,o):o}n(Hc,"resolveFrequency");var A=n((t,e)=>!!(t===e||typeof t=="object"&&typeof e=="object"&&t&&e&&t.id===e.id&&(!(Array.isArray(t.components)&&Array.isArray(e.components))||jc((t.components||[]).sort(),(e.components||[]).sort()))),"isSameProduct"),Tt=n(t=>t.optedin||[],"optedinSelector"),li=n(t=>t.optedout||[],"optedoutSelector"),fo=n(t=>t.autoshipByDefault||{},"autoshipSelector"),Gc=n(t=>t.defaultFrequencies||{},"defaultFrequenciesSelector"),Bc=n(t=>{var e;return((e=t==null?void 0:t.config)==null?void 0:e.frequencies)||[]},"sellingPlansSelector"),zc=n(t=>{var e;return((e=t==null?void 0:t.config)==null?void 0:e.frequenciesEveryPeriod)||[]},"frequenciesEveryPeriodSelector"),Yc=n(t=>{var e;return((e=t==null?void 0:t.config)==null?void 0:e.prepaidSellingPlans)||[]},"prepaidSellingPlansSelector"),Wc=n(t=>(t==null?void 0:t.prepaidShipmentsSelected)||{},"prepaidShipmentsSelectedSelector"),X=(0,z.default)(t=>Z(Tt,li,fo,(e,r,o)=>{let i=e.find(s=>A(t,s));return i||(r.find(s=>A(t,s))?!1:t&&o[t.id]?{id:t.id}:!1)}),t=>JSON.stringify(t)),cr=(0,z.default)(t=>Z(Tt,e=>{let r=e.find(o=>A(t,o));return r||!1}),t=>JSON.stringify(t)),pi=(0,z.default)(t=>Z(Tt,e=>e.some(r=>A(t,r)&&r.prepaidShipments)),t=>JSON.stringify(t)),ee=(0,z.default)(t=>Z(Wc,e=>e[t.id]||null),t=>JSON.stringify(t)),lr=(0,z.default)(t=>Z(li,e=>e.find(r=>A(t,r))));var te=(0,z.default)(t=>Z(X(t),e=>e&&e.frequency||null)),U=(0,z.default)(t=>Z(X(t),e=>e&&e.prepaidShipments||null)),L=(0,z.default)(t=>Z(Yc,e=>{var o;return(((o=e[x(t)])==null?void 0:o.map(({numberShipments:i})=>i))||[]).sort((i,s)=>i-s)})),Ye=(0,z.default)(t=>Z(Gc,Bc,zc,(e,r,o)=>e[x(t)]&&Hc(r,o,e[x(t)])||null)),ho=n(t=>t.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),"kebabCase"),M=n((t,e,r,o)=>({[r]:t.config&&t.config[r]||e&&e.hasAttribute&&e.hasAttribute(ho(r))&&e[r]||e.offer&&typeof(e.offer[r]!=="undefined")&&e.offer[r]||o}),"configSelector"),We=n(t=>({templates:t.templates||[]}),"templatesSelector");function pr(t){document.readyState==="loading"?window.addEventListener("DOMContentLoaded",t):t()}n(pr,"onReady");function Ot(){return document.querySelector([`script[src^="https://${rr}"]`,`script[src^="https://${or}"]`,`script[src^="http://${rr}"]`,`script[src^="http://${or}"]`].join(","))}n(Ot,"getMainJs");function mo(){let t=Ot();if(!t)return[];let e=new URL(t.src),r=e.host.startsWith(Te)?Te:Pe,o=e.pathname.split("/")[1];return!r&&!o?[]:[o,r,t]}n(mo,"resolveEnvAndMerchant");var x=n(t=>{var r;if(!t)return"";let e=`${t.id||t}`;return(r=q)!=null&&r.shopify_selling_plans&&(e=e.split(":")[0]),e},"safeProductId"),ui=n((t,e)=>{var r;if(q.shopify_selling_plans){let o=(r=e.frequencies)==null?void 0:r.indexOf(t);if(o>=0&&e.frequenciesEveryPeriod[o])return e.frequenciesEveryPeriod[o]}return t},"safeOgFrequency"),Pt=n((t,e)=>{var o,i,s;if(!`${t}`.includes("_"))return t;let r=(o=e.frequenciesEveryPeriod)==null?void 0:o.indexOf(t);return r>=0&&e.frequenciesEveryPeriod[r]?e.frequencies[r]:((i=e.frequencies)==null?void 0:i.length)>0&&((s=e.frequenciesEveryPeriod)==null?void 0:s.length)>0?(console.warn(`Unable to find selling plan match for frequency ${t}; falling back to first selling plan`),e.frequencies[0]):t},"frequencyToSellingPlan");function di(t){if(t.isReady())return;console.info("OG offers are auto initializing");let[e,r]=mo();if(!r&&!e)return;let o=document.createElement("script");o.onload=()=>console.info("OG pull initialization chunk for merchant",e,r),o.onerror=()=>t.initialize(e,r),o.src=`${window.location.protocol}//${r===Pe?rr:or}/${e}/main.js?initOnly=true`,document.head.appendChild(o)}n(di,"autoInitializeOffers");var fi=n(t=>{document.cookie=`${t}=; expires=Thu, 01 Jan 1970 00:00:01 GMT;`},"clearCookie");function hi(t){let e=document.cookie.match(`(^|;) ?${t}=([^;]*)(;|$)`);return e?e[2]:null}n(hi,"getCookieValue");var Je=n(t=>!!(t&&(t==null?void 0:t.includes("_"))),"isOgFrequency"),me=n((t=[])=>(t==null?void 0:t[0])||null,"getFirstSellingPlan"),ur=n((t=[],e=[])=>{var r;return!!(((r=q)==null?void 0:r.shopify_selling_plans)&&t.length&&e.length)},"hasShopifySellingPlans"),re=n((t,e,r)=>{if(t.length!==e.length)return null;let o=e.findIndex(i=>i===r);return o>=0?t[o]:null},"mapFrequencyToSellingPlan");function go(t,e,r){let o=t.querySelector(`[name="${e}"]`);if(o&&!r){o.remove();return}!o&&r&&(o=document.createElement("input"),o.type="hidden",o.name=e,t.appendChild(o)),o&&(o.value=r)}n(go,"getOrCreateHidden");function Ke(t,e){let[[r],o]=t.reduce((i,s)=>i[A(e,s)?0:1].push(s)&&i,[[],[]]);return[r||{},o||[]]}n(Ke,"getMatchingProductIfExists");var Y=n((t,e,r)=>({type:R,payload:{product:t,frequency:e,offer:r}}),"optinProduct"),Qe=n((t,e)=>({type:I,payload:{product:t,offer:e}}),"optoutProduct"),mi=n((t,e)=>({type:ht,payload:{newProduct:t,product:e}}),"productHasChangedComponents"),dr=n((t,e,r)=>({type:k,payload:{product:t,frequency:e,offer:r}}),"productChangeFrequency"),ye=n((t,e,r)=>({type:ae,payload:{product:t,prepaidShipments:e,offer:r}}),"productChangePrepaidShipments");var gi=n(t=>({type:zn,payload:{product:t}}),"concludeUpsell"),yi=n(t=>({type:Le,payload:t}),"setMerchantId"),bo=n(t=>({type:Me,payload:`${t}.${Math.floor(Math.random()*999999)}.${Math.round(new Date().getTime()/1e3)}`}),"createSessionId"),Jc=n(t=>({type:jn,payload:t}),"requestAuth"),wt=n((t,e,r,o)=>({type:Bt,payload:{public_id:t,sig_field:e,ts:r,sig:o}}),"authorize"),ge=n(t=>({type:xe,payload:t}),"unauthorized"),bi=n(t=>({type:Gt,payload:t}),"setAuthUrl"),fr=n(t=>({type:Jn,payload:t}),"fetchDone"),_i=n((t=Vn)=>n(function(r,o){if(window.og&&window.og.previewMode)return r(ge({message:"Offers are running in preview mode"}));let{merchantId:i,authUrl:s}=o(),a=Jc(s);return r(a),t(s).then(({sig_field:c,ts:l,sig:p})=>r(wt(i,c,l,p)),c=>r(ge(c))).finally(()=>r(fr(a)))},"fetchAuthThunk"),"fetchAuth"),Kc=n((t,e)=>({type:Hn,payload:{status:t,ordering:e}}),"requestOrders"),_o=n(t=>({type:zt,payload:t}),"receiveOrders"),So=n(t=>({type:Yt,payload:t}),"receiveItems"),hr=n((t=1,e="place")=>n(function(o,i){let{environment:{legoUrl:s},auth:a}=i();if(!a)return o(ge("No auth set."));let c=Kc(t,e);return o(c),he.fetchOrders(s,a,t,e).then(l=>{if(l.results){o(_o(l));let p=(l.results[0]||{}).public_id;if(p)return he.fetchItems(s,a,p).then(d=>o(So(d)))}return o(ge(l.detail)),null},l=>o(ge(l))).finally(()=>o(fr(c)))},"fetchOrdersThunk"),"fetchOrders"),Eo=n(t=>{switch(t){case Kn:return{type:$e,payload:t};case tr:return{type:je,payload:t};case Te:return{type:Ve,payload:t};case Pe:return{type:He,payload:t};default:throw new Error(`${t} is not a supported environment`)}},"setEnvironment"),Si=n(()=>(t,e)=>{let{merchantId:r,sessionId:o}=e();return(!o||r&&!o.startsWith(r))&&t(bo(r)),o},"requestSessionId"),Re=n((t,e)=>({type:P,payload:{...t,offer:e}}),"receiveOffer"),yo=n(t=>({type:Gn,payload:t}),"fetchResponseError"),Qc=n((t,e=Oe,r)=>({type:K,payload:{product:t,module:e,offer:r}}),"requestOffer"),Ei=n((t,e=Oe,r)=>n(function(i,s){let a=s(),{merchantId:c,sessionId:l,environment:{apiUrl:p}}=a,d=Qc(t,e,r);i(d);let u=x(t);return u?he.fetchOffer(p,c,l,u,e,a).then(h=>i(Re(h,r)),h=>i(yo(h))).finally(()=>i(fr(d))):null},"fetchOfferThunk"),"fetchOffer"),xi=n(()=>({type:Ge}),"checkout"),Zc=n((t,e,r,o)=>({type:Yn,payload:{product:t,order:e,quantity:r,offerId:o}}),"requestCreateOneTime"),Xc=n(t=>({type:Wt,payload:t}),"receiveCreateOneTime"),el=n((t,e)=>({type:Wn,payload:{item:t,frequency:e}}),"requestConvertOneTimeToSubscription"),tl=n((t,e)=>({type:Jt,payload:{response:t,product:e}}),"receiveConvertOneTime"),vi=n((t,e,r,o=!1,i=null)=>n(function(a,c){let{auth:l,config:p,environment:{legoUrl:d},previewUpsellOffer:u,offerId:h,sessionId:_}=c();if(!l)return a(ge("No auth set."));let S=ui(i,p),m=Zc(t,e,r,h);return a(m),(u?Promise.resolve({legoUrl:d,product:t,order:e,quantity:r,offer:h}):he.createOneTime(d,l,t.id,e,r,h)).then(b=>(a(Xc(b)),o?(a(el(b,S)),(u?Promise.resolve({item:b,frequency:S}):he.convertOneTimeToSubscription(d,l,b,S,h,_)).then(T=>a(tl(T,t)),T=>a(yo(T)))):b),b=>a(yo(b))).finally(()=>a(fr(m)))},"createIuThunk"),"createIu"),Oi=n(t=>({type:Kt,payload:t}),"setLocale"),Ti=n(t=>({type:Be,payload:t}),"setConfig"),Pi=n((t,e,r)=>({type:Qt,payload:{selector:t,markup:e,config:r}}),"addTemplate"),wi=n(t=>({type:Zt,payload:t}),"setTemplates"),Ci=n((t,e)=>({type:Xt,payload:{product:t,firstOrderPlaceDate:e}}),"setFirstOrderPlaceDate"),Ri=n((t,e)=>({type:er,payload:{product:t,productToSubscribe:e}}),"setProductToSubscribe"),Ai=n(t=>({type:ce,payload:t}),"receiveMerchantSettings");var Ct="OG_STATE",ki=n(t=>{try{return t===null?void 0:JSON.parse(t)}catch{return}},"safeParseState"),xo=n(()=>window.og&&window.og.previewMode,"isPreviewMode"),qi=n(()=>xo()?{}:ki(localStorage.getItem(Ct)),"loadState"),rl=n(t=>!t||!t.sessionId?!1:JSON.stringify({sessionId:t.sessionId,optedin:t.optedin,optedout:t.optedout,productOffer:t.productOffer,firstOrderPlaceDate:t.firstOrderPlaceDate,productToSubscribe:t.productToSubscribe}),"serializeState"),Di=n(t=>{if(xo())return;t&&t.sessionId&&(document.cookie="og_session_id="+encodeURIComponent(t.sessionId)+"; path=/; expires=Fri, 31 Dec 9999 23:59:59 GMT; SameSite=Lax");let e=rl(t);e&&localStorage.getItem(Ct)!==e&&localStorage.setItem(Ct,e)},"saveState"),Fi=n(t=>(0,Ii.throttle)(500,e=>{if(xo())return;let{key:r,newValue:o}=e;r===Ct&&o===null?(t.dispatch({type:de}),setTimeout(()=>t.dispatch(Si()),0)):r===Ct&&t.dispatch({type:ve,newValue:ki(o)})}),"listenLocalStorageChanges");var Li=se(jt());var ol=n((t,e,r=document)=>r.dispatchEvent(new CustomEvent(t,{detail:e})),"dispatchEvent"),Ui=n(t=>({payload:{product:{id:e,components:r}={}}={}}={})=>setTimeout(()=>ol("optin-changed",{productId:e,components:r,optedIn:t}),0),"dispatchOptinChangedEvent"),nl=[{expressions:[({type:t}={})=>t===R,({type:t}={})=>t===k],fn:Ui(!0)},{expressions:[({type:t}={})=>t===I],fn:Ui(!1)}],Mi=n(t=>e=>r=>{let o=t.getState();nl.forEach(i=>{i.expressions.some(s=>s(r,o))&&i.fn(r)}),e(r)},"dispatchMiddleware"),$i=n(t=>e=>r=>{var i;let o;switch(r.type){case P:case I:case R:case k:o=new CustomEvent(`og-${r.type.toLowerCase().replace(/_/g,"-")}`,{bubbles:!0,cancelable:!0,detail:r.payload}),(((i=r.payload)==null?void 0:i.offer)||document).dispatchEvent(o);break;default:}o!=null&&o.defaultPrevented||e(r)},"offerEvents"),Vi=n(t=>e=>r=>{e(r);let o=(0,Li.throttle)(500,()=>{Di({...t.getState()})});r.type!==ve&&o()},"localStorageMiddleware");var vo=n(()=>{let t,e;return[new Promise((r,o)=>{t=r,e=o}),t,e]},"waitFor");function ji(t){let[e,r]=vo(),[o,i]=vo(),[s,a]=vo();o.then(l=>{let{sessionId:p}=t.getState();!p||l&&!p.startsWith(l)?t.dispatch(bo(l)):a(p)});let c=Promise.all([o,e,s]);return c.then(()=>{var l;t.dispatch({type:Bn,payload:{}}),window.addEventListener("storage",Fi(t)),(l=t.getState().auth)!=null&&l.ts||t.dispatch(_i())}),l=>async p=>{$e===p.type||je===p.type||Ve===p.type||He===p.type?r(p.payload):Le===p.type?i(p.payload):Me===p.type?a(p.payload):await c,l(p)}}n(ji,"waitUntilOffersReady");function Hi(t,...e){if(window.og&&window.og.store)return window.og.store;let r=window.og&&window.og.previewMode,o=typeof window=="object"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({name:"Ordergroove Offers"}):oo,i=[ji,Un,Mi,$i],s={};if(!r)try{s=qi(),i.push(Vi)}catch{}let a=o(qn(...i,...e.filter(l=>l))),c=ro(t,s,a);return window.og=window.og||{},window.og.store=c,c}n(Hi,"makeStore");var il=Object.defineProperty,mr=n((t,e)=>il(t,"name",{value:e,configurable:!0}),"i"),sl=mr(t=>e=>t.indexOf(e.origin)>=0,"createIsMessageAllowed"),Bi=["https://rc3.ordergroove.com","https://rc3.stg.ordergroove.com","https://rc3-beta.stg.ordergroove.com","http://localhost:3000","http://localhost:3010","http://0.0.0.0:3010",window.location.origin],Gi=mr(t=>(e,r)=>{Bi.forEach(o=>t.postMessage({ogType:e,...r},o))},"createBroadcastMessage");function Oo(t=window.opener,e=window.og){let r=mr(o=>{let i=sl(Bi),s=Gi(o.source),a=o.data.options||{};if(i(o)&&o.data.ogType==="READY"){let c="//static.ordergroove.com/@ordergroove/offers-live-editor/0.6.7/dist/";c.startsWith("//")&&(c=window.location.protocol+c),c.endsWith("/")||(c+="/"),import(`${c}client.js`).then(({initializeClient:l})=>{l({isMessageAllowed:i,broadcastMessage:s,options:a,og:e}),window.removeEventListener("message",r)})}},"handleReady");t&&t!==window&&(window.addEventListener("message",r),Gi(t)("READY"))}n(Oo,"h");mr(Oo,"offersLiveEditor");var gr=null,al=n(t=>({dispatch:t}),"defaultMapDispatchToProps"),zi=n(t=>{if(!gr)throw new Error("Missing redux store.");return gr},"resolveStore"),cl=n((t,e)=>r=>{let{getState:o,dispatch:i}=zi(r),s=t?t(o(),r):{},a=e(i,r);Object.assign(r,s,a)},"createRecalcProps"),g=n((t,e=al)=>r=>{let i=cl(t,typeof e=="function"?e:s=>kn(e,s));return class extends r{get store(){return gr}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._storeUnsubscribe=zi(this).subscribe(()=>i(this)),i(this)}attributeChangedCallback(s,a,c){super.attributeChangedCallback&&super.attributeChangedCallback(s,a,c),this._storeUnsubscribe&&a!==c&&i(this)}disconnectedCallback(){this._storeUnsubscribe(),super.disconnectedCallback&&super.disconnectedCallback()}}},"connect"),Yi=n(t=>{gr=t},"setStore");var To=n((t={},e=[])=>(t.optedin||[]).map(r=>{let o={product:r.id,subscription_info:{components:r.components||[]},tracking_override:{offer:((t.productOffer||{})[r.id]||[])[0],...t.sessionId&&{session_id:t.sessionId},...xt(r.frequency)}};return t.firstOrderPlaceDate&&t.firstOrderPlaceDate[r.id]&&(o.subscription_info.first_order_place_date=t.firstOrderPlaceDate[r.id]),t.productToSubscribe&&t.productToSubscribe[r.id]&&(o.tracking_override.product=t.productToSubscribe[r.id]),o}).filter(r=>r.tracking_override.offer).filter(r=>e.length?e.includes(r.product):r),"getProductsForPurchasePost"),Ze=n((t={})=>{let e={};return Object.entries(t).forEach(([r,o])=>{Object.entries(o).forEach(([i,s])=>{let a={};s&&!Array.isArray(s)?a=s:a={frequency:i,prepaidShipments:null,regularPrice:s[0],subscriptionPrice:s[2],discountRate:s[1]},e[r]?e[r].push(a):e[r]=[a]})}),e},"getObjectStructuredProductPlans");var Po=typeof window<"u"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0;var Ae=n((t,e,r=null)=>{for(;e!==r;){let o=e.nextSibling;t.removeChild(e),e=o}},"removeNodes");var $=`{{lit-${String(Math.random()).slice(2)}}}`,wo=`<!--${$}-->`,Wi=new RegExp(`${$}|${wo}`),Xe="$lit$",be=class{constructor(e,r){this.parts=[],this.element=r;let o=[],i=[],s=document.createTreeWalker(r.content,133,null,!1),a=0,c=-1,l=0,{strings:p,values:{length:d}}=e;for(;l<d;){let u=s.nextNode();if(u===null){s.currentNode=i.pop();continue}if(c++,u.nodeType===1){if(u.hasAttributes()){let h=u.attributes,{length:_}=h,S=0;for(let m=0;m<_;m++)Ji(h[m].name,Xe)&&S++;for(;S-- >0;){let m=p[l],b=yr.exec(m)[2],T=b.toLowerCase()+Xe,E=u.getAttribute(T);u.removeAttribute(T);let w=E.split(Wi);this.parts.push({type:"attribute",index:c,name:b,strings:w}),l+=w.length-1}}u.tagName==="TEMPLATE"&&(i.push(u),s.currentNode=u.content)}else if(u.nodeType===3){let h=u.data;if(h.indexOf($)>=0){let _=u.parentNode,S=h.split(Wi),m=S.length-1;for(let b=0;b<m;b++){let T,E=S[b];if(E==="")T=oe();else{let w=yr.exec(E);w!==null&&Ji(w[2],Xe)&&(E=E.slice(0,w.index)+w[1]+w[2].slice(0,-Xe.length)+w[3]),T=document.createTextNode(E)}_.insertBefore(T,u),this.parts.push({type:"node",index:++c})}S[m]===""?(_.insertBefore(oe(),u),o.push(u)):u.data=S[m],l+=m}}else if(u.nodeType===8)if(u.data===$){let h=u.parentNode;(u.previousSibling===null||c===a)&&(c++,h.insertBefore(oe(),u)),a=c,this.parts.push({type:"node",index:c}),u.nextSibling===null?u.data="":(o.push(u),c--),l++}else{let h=-1;for(;(h=u.data.indexOf($,h+1))!==-1;)this.parts.push({type:"node",index:-1}),l++}}for(let u of o)u.parentNode.removeChild(u)}};n(be,"Template");var Ji=n((t,e)=>{let r=t.length-e.length;return r>=0&&t.slice(r)===e},"endsWith"),Rt=n(t=>t.index!==-1,"isTemplatePartActive"),oe=n(()=>document.createComment(""),"createMarker"),yr=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;var Co=133;function Ro(t,e){let{element:{content:r},parts:o}=t,i=document.createTreeWalker(r,Co,null,!1),s=At(o),a=o[s],c=-1,l=0,p=[],d=null;for(;i.nextNode();){c++;let u=i.currentNode;for(u.previousSibling===d&&(d=null),e.has(u)&&(p.push(u),d===null&&(d=u)),d!==null&&l++;a!==void 0&&a.index===c;)a.index=d!==null?-1:a.index-l,s=At(o,s),a=o[s]}p.forEach(u=>u.parentNode.removeChild(u))}n(Ro,"removeNodesFromTemplate");var pl=n(t=>{let e=t.nodeType===11?0:1,r=document.createTreeWalker(t,Co,null,!1);for(;r.nextNode();)e++;return e},"countNodes"),At=n((t,e=-1)=>{for(let r=e+1;r<t.length;r++){let o=t[r];if(Rt(o))return r}return-1},"nextActiveIndexInTemplateParts");function Ki(t,e,r=null){let{element:{content:o},parts:i}=t;if(r==null){o.appendChild(e);return}let s=document.createTreeWalker(o,Co,null,!1),a=At(i),c=0,l=-1;for(;s.nextNode();)for(l++,s.currentNode===r&&(c=pl(e),r.parentNode.insertBefore(e,r));a!==-1&&i[a].index===l;){if(c>0){for(;a!==-1;)i[a].index+=c,a=At(i,a);return}a=At(i,a)}}n(Ki,"insertNodeIntoTemplate");var ul=new WeakMap;var Ne=n(t=>typeof t=="function"&&ul.has(t),"isDirective");var D={},br={};var le=class{constructor(e,r,o){this.__parts=[],this.template=e,this.processor=r,this.options=o}update(e){let r=0;for(let o of this.__parts)o!==void 0&&o.setValue(e[r]),r++;for(let o of this.__parts)o!==void 0&&o.commit()}_clone(){let e=Po?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),r=[],o=this.template.parts,i=document.createTreeWalker(e,133,null,!1),s=0,a=0,c,l=i.nextNode();for(;s<o.length;){if(c=o[s],!Rt(c)){this.__parts.push(void 0),s++;continue}for(;a<c.index;)a++,l.nodeName==="TEMPLATE"&&(r.push(l),i.currentNode=l.content),(l=i.nextNode())===null&&(i.currentNode=r.pop(),l=i.nextNode());if(c.type==="node"){let p=this.processor.handleTextExpression(this.options);p.insertAfterNode(l.previousSibling),this.__parts.push(p)}else this.__parts.push(...this.processor.handleAttributeExpressions(l,c.name,c.strings,this.options));s++}return Po&&(document.adoptNode(e),customElements.upgrade(e)),e}};n(le,"TemplateInstance");var Qi=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:t=>t}),fl=` ${$} `,ne=class{constructor(e,r,o,i){this.strings=e,this.values=r,this.type=o,this.processor=i}getHTML(){let e=this.strings.length-1,r="",o=!1;for(let i=0;i<e;i++){let s=this.strings[i],a=s.lastIndexOf("<!--");o=(a>-1||o)&&s.indexOf("-->",a+1)===-1;let c=yr.exec(s);c===null?r+=s+(o?fl:wo):r+=s.substr(0,c.index)+c[1]+c[2]+Xe+c[3]+$}return r+=this.strings[e],r}getTemplateElement(){let e=document.createElement("template"),r=this.getHTML();return Qi!==void 0&&(r=Qi.createHTML(r)),e.innerHTML=r,e}};n(ne,"TemplateResult");var Sr=n(t=>t===null||!(typeof t=="object"||typeof t=="function"),"isPrimitive"),_r=n(t=>Array.isArray(t)||!!(t&&t[Symbol.iterator]),"isIterable"),Ie=class{constructor(e,r,o){this.dirty=!0,this.element=e,this.name=r,this.strings=o,this.parts=[];for(let i=0;i<o.length-1;i++)this.parts[i]=this._createPart()}_createPart(){return new et(this)}_getValue(){let e=this.strings,r=e.length-1,o=this.parts;if(r===1&&e[0]===""&&e[1]===""){let s=o[0].value;if(typeof s=="symbol")return String(s);if(typeof s=="string"||!_r(s))return s}let i="";for(let s=0;s<r;s++){i+=e[s];let a=o[s];if(a!==void 0){let c=a.value;if(Sr(c)||!_r(c))i+=typeof c=="string"?c:String(c);else for(let l of c)i+=typeof l=="string"?l:String(l)}}return i+=e[r],i}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}};n(Ie,"AttributeCommitter");var et=class{constructor(e){this.value=void 0,this.committer=e}setValue(e){e!==D&&(!Sr(e)||e!==this.value)&&(this.value=e,Ne(e)||(this.committer.dirty=!0))}commit(){for(;Ne(this.value);){let e=this.value;this.value=D,e(this)}this.value!==D&&this.committer.commit()}};n(et,"AttributePart");var ie=class{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(oe()),this.endNode=e.appendChild(oe())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=oe()),e.__insert(this.endNode=oe())}insertAfterPart(e){e.__insert(this.startNode=oe()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(this.startNode.parentNode===null)return;for(;Ne(this.__pendingValue);){let r=this.__pendingValue;this.__pendingValue=D,r(this)}let e=this.__pendingValue;e!==D&&(Sr(e)?e!==this.value&&this.__commitText(e):e instanceof ne?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):_r(e)?this.__commitIterable(e):e===br?(this.value=br,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){let r=this.startNode.nextSibling;e=e??"";let o=typeof e=="string"?e:String(e);r===this.endNode.previousSibling&&r.nodeType===3?r.data=o:this.__commitNode(document.createTextNode(o)),this.value=e}__commitTemplateResult(e){let r=this.options.templateFactory(e);if(this.value instanceof le&&this.value.template===r)this.value.update(e.values);else{let o=new le(r,e.processor,this.options),i=o._clone();o.update(e.values),this.__commitNode(i),this.value=o}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());let r=this.value,o=0,i;for(let s of e)i=r[o],i===void 0&&(i=new ie(this.options),r.push(i),o===0?i.appendIntoPart(this):i.insertAfterPart(r[o-1])),i.setValue(s),i.commit(),o++;o<r.length&&(r.length=o,this.clear(i&&i.endNode))}clear(e=this.startNode){Ae(this.startNode.parentNode,e.nextSibling,this.endNode)}};n(ie,"NodePart");var tt=class{constructor(e,r,o){if(this.value=void 0,this.__pendingValue=void 0,o.length!==2||o[0]!==""||o[1]!=="")throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=r,this.strings=o}setValue(e){this.__pendingValue=e}commit(){for(;Ne(this.__pendingValue);){let r=this.__pendingValue;this.__pendingValue=D,r(this)}if(this.__pendingValue===D)return;let e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=D}};n(tt,"BooleanAttributePart");var rt=class extends Ie{constructor(e,r,o){super(e,r,o),this.single=o.length===2&&o[0]===""&&o[1]===""}_createPart(){return new Nt(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}};n(rt,"PropertyCommitter");var Nt=class extends et{};n(Nt,"PropertyPart");var Zi=!1;(()=>{try{let t={get capture(){return Zi=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch{}})();var ot=class{constructor(e,r,o){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=r,this.eventContext=o,this.__boundHandleEvent=i=>this.handleEvent(i)}setValue(e){this.__pendingValue=e}commit(){for(;Ne(this.__pendingValue);){let s=this.__pendingValue;this.__pendingValue=D,s(this)}if(this.__pendingValue===D)return;let e=this.__pendingValue,r=this.value,o=e==null||r!=null&&(e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive),i=e!=null&&(r==null||o);o&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=hl(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=D}handleEvent(e){typeof this.value=="function"?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}};n(ot,"EventPart");var hl=n(t=>t&&(Zi?{capture:t.capture,passive:t.passive,once:t.once}:t.capture),"getOptions");function Ao(t){let e=ke.get(t.type);e===void 0&&(e={stringsArray:new WeakMap,keyString:new Map},ke.set(t.type,e));let r=e.stringsArray.get(t.strings);if(r!==void 0)return r;let o=t.strings.join($);return r=e.keyString.get(o),r===void 0&&(r=new be(t,t.getTemplateElement()),e.keyString.set(o,r)),e.stringsArray.set(t.strings,r),r}n(Ao,"templateFactory");var ke=new Map;var _e=new WeakMap,No=n((t,e,r)=>{let o=_e.get(e);o===void 0&&(Ae(e,e.firstChild),_e.set(e,o=new ie(Object.assign({templateFactory:Ao},r))),o.appendInto(e)),o.setValue(t),o.commit()},"render");var It=class{handleAttributeExpressions(e,r,o,i){let s=r[0];return s==="."?new rt(e,r.slice(1),o).parts:s==="@"?[new ot(e,r.slice(1),i.eventContext)]:s==="?"?[new tt(e,r.slice(1),o)]:new Ie(e,r,o).parts}handleTextExpression(e){return new ie(e)}};n(It,"DefaultTemplateProcessor");var Io=new It;typeof window<"u"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.3.0");var f=n((t,...e)=>new ne(t,e,"html",Io),"html");var es=n((t,e)=>`${t}--${e}`,"getTemplateCacheKey"),Er=!0;typeof window.ShadyCSS>"u"?Er=!1:typeof window.ShadyCSS.prepareTemplateDom>"u"&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),Er=!1);var gl=n(t=>e=>{let r=es(e.type,t),o=ke.get(r);o===void 0&&(o={stringsArray:new WeakMap,keyString:new Map},ke.set(r,o));let i=o.stringsArray.get(e.strings);if(i!==void 0)return i;let s=e.strings.join($);if(i=o.keyString.get(s),i===void 0){let a=e.getTemplateElement();Er&&window.ShadyCSS.prepareTemplateDom(a,t),i=new be(e,a),o.keyString.set(s,i)}return o.stringsArray.set(e.strings,i),i},"shadyTemplateFactory"),yl=["html","svg"],bl=n(t=>{yl.forEach(e=>{let r=ke.get(es(e,t));r!==void 0&&r.keyString.forEach(o=>{let{element:{content:i}}=o,s=new Set;Array.from(i.querySelectorAll("style")).forEach(a=>{s.add(a)}),Ro(o,s)})})},"removeStylesFromLitTemplates"),ts=new Set,_l=n((t,e,r)=>{ts.add(t);let o=r?r.element:document.createElement("template"),i=e.querySelectorAll("style"),{length:s}=i;if(s===0){window.ShadyCSS.prepareTemplateStyles(o,t);return}let a=document.createElement("style");for(let p=0;p<s;p++){let d=i[p];d.parentNode.removeChild(d),a.textContent+=d.textContent}bl(t);let c=o.content;r?Ki(r,a,c.firstChild):c.insertBefore(a,c.firstChild),window.ShadyCSS.prepareTemplateStyles(o,t);let l=c.querySelector("style");if(window.ShadyCSS.nativeShadow&&l!==null)e.insertBefore(l.cloneNode(!0),e.firstChild);else if(r){c.insertBefore(a,c.firstChild);let p=new Set;p.add(a),Ro(r,p)}},"prepareTemplateStyles"),rs=n((t,e,r)=>{if(!r||typeof r!="object"||!r.scopeName)throw new Error("The `scopeName` option is required.");let o=r.scopeName,i=_e.has(e),s=Er&&e.nodeType===11&&!!e.host,a=s&&!ts.has(o),c=a?document.createDocumentFragment():e;if(No(t,c,Object.assign({templateFactory:gl(o)},r)),a){let l=_e.get(c);_e.delete(c);let p=l.value instanceof le?l.value.template:void 0;_l(o,c,p),Ae(e,e.firstChild),e.appendChild(c),_e.set(e,l)}!i&&s&&window.ShadyCSS.styleElement(e.host)},"render");var os;window.JSCompiler_renameProperty=(t,e)=>t;var Lo={toAttribute(t,e){switch(e){case Boolean:return t?"":null;case Object:case Array:return t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){switch(e){case Boolean:return t!==null;case Number:return t===null?null:Number(t);case Object:case Array:return JSON.parse(t)}return t}},ns=n((t,e)=>e!==t&&(e===e||t===t),"notEqual"),ko={attribute:!0,type:String,converter:Lo,reflect:!1,hasChanged:ns},qo=1,Do=1<<2,Fo=1<<3,Uo=1<<4,Mo="finalized",nt=class extends HTMLElement{constructor(){super(),this.initialize()}static get observedAttributes(){this.finalize();let e=[];return this._classProperties.forEach((r,o)=>{let i=this._attributeNameForProperty(o,r);i!==void 0&&(this._attributeToPropertyMap.set(i,o),e.push(i))}),e}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;let e=Object.getPrototypeOf(this)._classProperties;e!==void 0&&e.forEach((r,o)=>this._classProperties.set(o,r))}}static createProperty(e,r=ko){if(this._ensureClassProperties(),this._classProperties.set(e,r),r.noAccessor||this.prototype.hasOwnProperty(e))return;let o=typeof e=="symbol"?Symbol():`__${e}`,i=this.getPropertyDescriptor(e,o,r);i!==void 0&&Object.defineProperty(this.prototype,e,i)}static getPropertyDescriptor(e,r,o){return{get(){return this[r]},set(i){let s=this[e];this[r]=i,this.requestUpdateInternal(e,s,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this._classProperties&&this._classProperties.get(e)||ko}static finalize(){let e=Object.getPrototypeOf(this);if(e.hasOwnProperty(Mo)||e.finalize(),this[Mo]=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){let r=this.properties,o=[...Object.getOwnPropertyNames(r),...typeof Object.getOwnPropertySymbols=="function"?Object.getOwnPropertySymbols(r):[]];for(let i of o)this.createProperty(i,r[i])}}static _attributeNameForProperty(e,r){let o=r.attribute;return o===!1?void 0:typeof o=="string"?o:typeof e=="string"?e.toLowerCase():void 0}static _valueHasChanged(e,r,o=ns){return o(e,r)}static _propertyValueFromAttribute(e,r){let o=r.type,i=r.converter||Lo,s=typeof i=="function"?i:i.fromAttribute;return s?s(e,o):e}static _propertyValueToAttribute(e,r){if(r.reflect===void 0)return;let o=r.type,i=r.converter;return(i&&i.toAttribute||Lo.toAttribute)(e,o)}initialize(){this._updateState=0,this._updatePromise=new Promise(e=>this._enableUpdatingResolver=e),this._changedProperties=new Map,this._saveInstanceProperties(),this.requestUpdateInternal()}_saveInstanceProperties(){this.constructor._classProperties.forEach((e,r)=>{if(this.hasOwnProperty(r)){let o=this[r];delete this[r],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(r,o)}})}_applyInstanceProperties(){this._instanceProperties.forEach((e,r)=>this[r]=e),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){this._enableUpdatingResolver!==void 0&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(e,r,o){r!==o&&this._attributeToProperty(e,o)}_propertyToAttribute(e,r,o=ko){let i=this.constructor,s=i._attributeNameForProperty(e,o);if(s!==void 0){let a=i._propertyValueToAttribute(r,o);if(a===void 0)return;this._updateState=this._updateState|Fo,a==null?this.removeAttribute(s):this.setAttribute(s,a),this._updateState=this._updateState&~Fo}}_attributeToProperty(e,r){if(this._updateState&Fo)return;let o=this.constructor,i=o._attributeToPropertyMap.get(e);if(i!==void 0){let s=o.getPropertyOptions(i);this._updateState=this._updateState|Uo,this[i]=o._propertyValueFromAttribute(r,s),this._updateState=this._updateState&~Uo}}requestUpdateInternal(e,r,o){let i=!0;if(e!==void 0){let s=this.constructor;o=o||s.getPropertyOptions(e),s._valueHasChanged(this[e],r,o.hasChanged)?(this._changedProperties.has(e)||this._changedProperties.set(e,r),o.reflect===!0&&!(this._updateState&Uo)&&(this._reflectingProperties===void 0&&(this._reflectingProperties=new Map),this._reflectingProperties.set(e,o))):i=!1}!this._hasRequestedUpdate&&i&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(e,r){return this.requestUpdateInternal(e,r),this.updateComplete}async _enqueueUpdate(){this._updateState=this._updateState|Do;try{await this._updatePromise}catch{}let e=this.performUpdate();return e!=null&&await e,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return this._updateState&Do}get hasUpdated(){return this._updateState&qo}performUpdate(){if(!this._hasRequestedUpdate)return;this._instanceProperties&&this._applyInstanceProperties();let e=!1,r=this._changedProperties;try{e=this.shouldUpdate(r),e?this.update(r):this._markUpdated()}catch(o){throw e=!1,this._markUpdated(),o}e&&(this._updateState&qo||(this._updateState=this._updateState|qo,this.firstUpdated(r)),this.updated(r))}_markUpdated(){this._changedProperties=new Map,this._updateState=this._updateState&~Do}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this._updatePromise}shouldUpdate(e){return!0}update(e){this._reflectingProperties!==void 0&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((r,o)=>this._propertyToAttribute(o,this[o],r)),this._reflectingProperties=void 0),this._markUpdated()}updated(e){}firstUpdated(e){}};n(nt,"UpdatingElement");os=Mo;nt[os]=!0;var is=Element.prototype,Ef=is.msMatchesSelector||is.webkitMatchesSelector;var xr=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$o=Symbol(),it=class{constructor(e,r){if(r!==$o)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){return this._styleSheet===void 0&&(xr?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}};n(it,"CSSResult");var ss=n(t=>new it(String(t),$o),"unsafeCSS"),Sl=n(t=>{if(t instanceof it)return t.cssText;if(typeof t=="number")return t;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${t}. Use 'unsafeCSS' to pass non-literal values, but
11
+ var lib=(()=>{var Ia=Object.create;var dt=Object.defineProperty;var ka=Object.getOwnPropertyDescriptor;var qa=Object.getOwnPropertyNames;var Da=Object.getPrototypeOf,Fa=Object.prototype.hasOwnProperty;var n=(t,e)=>dt(t,"name",{value:e,configurable:!0});var J=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Rn=(t,e)=>{for(var r in e)dt(t,r,{get:e[r],enumerable:!0})},An=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of qa(e))!Fa.call(t,i)&&i!==r&&dt(t,i,{get:()=>e[i],enumerable:!(o=ka(e,i))||o.enumerable});return t};var se=(t,e,r)=>(r=t!=null?Ia(Da(t)):{},An(e||!t||!t.__esModule?dt(r,"default",{value:t,enumerable:!0}):r,t)),Ua=t=>An(dt({},"__esModule",{value:!0}),t);var jt=J((Vt,Ln)=>{(function(t,e){typeof Vt=="object"&&typeof Ln<"u"?e(Vt):typeof define=="function"&&define.amd?define(["exports"],e):(t=t||self,e(t.throttleDebounce={}))})(Vt,function(t){"use strict";function e(o,i,s,a){var c,l=!1,p=0;function d(){c&&clearTimeout(c)}n(d,"clearExistingTimeout");function u(){d(),l=!0}n(u,"cancel"),typeof i!="boolean"&&(a=s,s=i,i=void 0);function h(){for(var _=arguments.length,S=new Array(_),m=0;m<_;m++)S[m]=arguments[m];var b=this,T=Date.now()-p;if(l)return;function E(){p=Date.now(),s.apply(b,S)}n(E,"exec");function w(){c=void 0}n(w,"clear"),a&&!c&&E(),d(),a===void 0&&T>o?E():i!==!0&&(c=setTimeout(a?w:E,a===void 0?o-T:o))}return n(h,"wrapper"),h.cancel=u,h}n(e,"throttle");function r(o,i,s){return s===void 0?e(o,i,!1):e(o,s,i!==!1)}n(r,"debounce"),t.debounce=r,t.throttle=e,Object.defineProperty(t,"__esModule",{value:!0})})});var _t=J((Vu,ii)=>{var Wa="Expected a function",Xn="__lodash_hash_undefined__",Ja="[object Function]",Ka="[object GeneratorFunction]",Qa=/[\\^$.*+?()[\]{}|]/g,Za=/^\[object .+?Constructor\]$/,Xa=typeof window=="object"&&window&&window.Object===Object&&window,ec=typeof self=="object"&&self&&self.Object===Object&&self,ei=Xa||ec||Function("return this")();function tc(t,e){return t?.[e]}n(tc,"getValue");function rc(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}n(rc,"isHostObject");var oc=Array.prototype,nc=Function.prototype,ti=Object.prototype,so=ei["__core-js_shared__"],Zn=function(){var t=/[^.]+$/.exec(so&&so.keys&&so.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),ri=nc.toString,ao=ti.hasOwnProperty,ic=ti.toString,sc=RegExp("^"+ri.call(ao).replace(Qa,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ac=oc.splice,cc=oi(ei,"Map"),bt=oi(Object,"create");function we(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}n(we,"Hash");function lc(){this.__data__=bt?bt(null):{}}n(lc,"hashClear");function pc(t){return this.has(t)&&delete this.__data__[t]}n(pc,"hashDelete");function uc(t){var e=this.__data__;if(bt){var r=e[t];return r===Xn?void 0:r}return ao.call(e,t)?e[t]:void 0}n(uc,"hashGet");function dc(t){var e=this.__data__;return bt?e[t]!==void 0:ao.call(e,t)}n(dc,"hashHas");function fc(t,e){var r=this.__data__;return r[t]=bt&&e===void 0?Xn:e,this}n(fc,"hashSet");we.prototype.clear=lc;we.prototype.delete=pc;we.prototype.get=uc;we.prototype.has=dc;we.prototype.set=fc;function ze(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}n(ze,"ListCache");function hc(){this.__data__=[]}n(hc,"listCacheClear");function mc(t){var e=this.__data__,r=nr(e,t);if(r<0)return!1;var o=e.length-1;return r==o?e.pop():ac.call(e,r,1),!0}n(mc,"listCacheDelete");function gc(t){var e=this.__data__,r=nr(e,t);return r<0?void 0:e[r][1]}n(gc,"listCacheGet");function yc(t){return nr(this.__data__,t)>-1}n(yc,"listCacheHas");function bc(t,e){var r=this.__data__,o=nr(r,t);return o<0?r.push([t,e]):r[o][1]=e,this}n(bc,"listCacheSet");ze.prototype.clear=hc;ze.prototype.delete=mc;ze.prototype.get=gc;ze.prototype.has=yc;ze.prototype.set=bc;function Ce(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}n(Ce,"MapCache");function _c(){this.__data__={hash:new we,map:new(cc||ze),string:new we}}n(_c,"mapCacheClear");function Sc(t){return ir(this,t).delete(t)}n(Sc,"mapCacheDelete");function Ec(t){return ir(this,t).get(t)}n(Ec,"mapCacheGet");function xc(t){return ir(this,t).has(t)}n(xc,"mapCacheHas");function vc(t,e){return ir(this,t).set(t,e),this}n(vc,"mapCacheSet");Ce.prototype.clear=_c;Ce.prototype.delete=Sc;Ce.prototype.get=Ec;Ce.prototype.has=xc;Ce.prototype.set=vc;function nr(t,e){for(var r=t.length;r--;)if(Cc(t[r][0],e))return r;return-1}n(nr,"assocIndexOf");function Oc(t){if(!ni(t)||Pc(t))return!1;var e=Rc(t)||rc(t)?sc:Za;return e.test(wc(t))}n(Oc,"baseIsNative");function ir(t,e){var r=t.__data__;return Tc(e)?r[typeof e=="string"?"string":"hash"]:r.map}n(ir,"getMapData");function oi(t,e){var r=tc(t,e);return Oc(r)?r:void 0}n(oi,"getNative");function Tc(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}n(Tc,"isKeyable");function Pc(t){return!!Zn&&Zn in t}n(Pc,"isMasked");function wc(t){if(t!=null){try{return ri.call(t)}catch{}try{return t+""}catch{}}return""}n(wc,"toSource");function co(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError(Wa);var r=n(function(){var o=arguments,i=e?e.apply(this,o):o[0],s=r.cache;if(s.has(i))return s.get(i);var a=t.apply(this,o);return r.cache=s.set(i,a),a},"memoized");return r.cache=new(co.Cache||Ce),r}n(co,"memoize");co.Cache=Ce;function Cc(t,e){return t===e||t!==t&&e!==e}n(Cc,"eq");function Rc(t){var e=ni(t)?ic.call(t):"";return e==Ja||e==Ka}n(Rc,"isFunction");function ni(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}n(ni,"isObject");ii.exports=co});var vr=J((If,cs)=>{var El={PAR_OPEN:"(".charCodeAt(0),PAR_CLOSE:")".charCodeAt(0),OP_NOT:"!".charCodeAt(0),BINARY_AND:"&".charCodeAt(0),BINARY_OR:"|".charCodeAt(0),LITERAL:"LITERAL",END:"END",LEAF:"LEAF",ATOMIC:"ATOMIC"};cs.exports=El});var ps=J((kf,ls)=>{var qe=vr(),xl=n(t=>{let e="",r=[];for(let o of t){let i=o.charCodeAt(0);switch(i){case qe.PAR_OPEN:case qe.PAR_CLOSE:case qe.OP_NOT:case qe.BINARY_AND:case qe.BINARY_OR:e&&(r.push({type:qe.LITERAL,value:e}),e=""),r.push({type:i,value:o});break;default:e+=o}}return e&&r.push({type:qe.LITERAL,value:e}),r},"Tokenizer");ls.exports=xl});var ds=J((qf,us)=>{var Se=vr(),vl=n(t=>{let e=[],r=[];return t.forEach(i=>{switch(i.type){case Se.LITERAL:e.unshift(i);break;case Se.BINARY_AND:case Se.BINARY_OR:case Se.OP_NOT:case Se.PAR_OPEN:r.push(i);break;case Se.PAR_CLOSE:for(;r.length&&r[r.length-1].type!==Se.PAR_OPEN;)e.unshift(r.pop());r.pop(),r.length&&r[r.length-1].type===Se.OP_NOT&&e.unshift(r.pop());break;default:break}}),r.length&&[...r.reverse(),...e]||e},"PolishNotation"),Ol=n(function*(t){for(let e=0;e<t.length-1;e++)yield t[e];return t[t.length-1]},"PolishGenerator");us.exports={PolishNotation:vl,PolishGenerator:Ol}});var hs=J((Df,fs)=>{var F=vr(),V=class{constructor(e,r,o,i){this.op=e,this.left=r,this.right=o,this.literal=i}isLeaf(){return this.op===F.LEAF}isAtomic(){return this.isLeaf()||this.op===F.OP_NOT&&this.left.isLeaf()}getLiteralValue(){return this.literal}static CreateAnd(e,r){return new V(F.BINARY_AND,e,r)}static CreateNot(e){return new V(F.OP_NOT,e)}static CreateOr(e,r){return new V(F.BINARY_OR,e,r)}static CreateLiteral(e){return new V(F.LEAF,null,null,e)}};n(V,"ExpNode");var st=n(t=>{let e=t.next().value;switch(e.type){case F.LITERAL:return V.CreateLiteral(e.value);case F.OP_NOT:return V.CreateNot(st(t));case F.BINARY_AND:{let r=st(t),o=st(t);return V.CreateAnd(r,o)}case F.BINARY_OR:{let r=st(t),o=st(t);return V.CreateOr(r,o)}}return null},"make"),at=n((t,e)=>{if(t.isLeaf())return e(t.getLiteralValue());if(t.op===F.OP_NOT)return!at(t.left,e);if(t.op===F.BINARY_OR)return at(t.left,e)||at(t.right,e);if(t.op===F.BINARY_AND)return at(t.left,e)&&at(t.right,e)},"nodeEvaluator");fs.exports={make:st,nodeEvaluator:at}});var bs=J((Ff,ys)=>{var Tl=ps(),ms=ds(),gs=hs(),Pl=n((t,e)=>{let r=Tl(t),o=ms.PolishNotation(r),i=ms.PolishGenerator(o),s=gs.make(i);return gs.nodeEvaluator(s,e)},"parse");ys.exports={parse:Pl}});var ta=J((kg,Jo)=>{function cp(t,e){var r,o,i,s,a,c,l,p,d,u;for(r=t.length&3,o=t.length-r,i=e,a=3432918353,l=461845907,u=0;u<o;)d=t.charCodeAt(u)&255|(t.charCodeAt(++u)&255)<<8|(t.charCodeAt(++u)&255)<<16|(t.charCodeAt(++u)&255)<<24,++u,d=(d&65535)*a+(((d>>>16)*a&65535)<<16)&4294967295,d=d<<15|d>>>17,d=(d&65535)*l+(((d>>>16)*l&65535)<<16)&4294967295,i^=d,i=i<<13|i>>>19,s=(i&65535)*5+(((i>>>16)*5&65535)<<16)&4294967295,i=(s&65535)+27492+(((s>>>16)+58964&65535)<<16);switch(d=0,r){case 3:d^=(t.charCodeAt(u+2)&255)<<16;case 2:d^=(t.charCodeAt(u+1)&255)<<8;case 1:d^=t.charCodeAt(u)&255,d=(d&65535)*a+(((d>>>16)*a&65535)<<16)&4294967295,d=d<<15|d>>>17,d=(d&65535)*l+(((d>>>16)*l&65535)<<16)&4294967295,i^=d}return i^=t.length,i^=i>>>16,i=(i&65535)*2246822507+(((i>>>16)*2246822507&65535)<<16)&4294967295,i^=i>>>13,i=(i&65535)*3266489909+(((i>>>16)*3266489909&65535)<<16)&4294967295,i^=i>>>16,i>>>0}n(cp,"murmurhash3_32_gc");typeof Jo<"u"&&(Jo.exports=cp)});var ra=J((qg,Ko)=>{function lp(t,e){for(var r=t.length,o=e^r,i=0,s;r>=4;)s=t.charCodeAt(i)&255|(t.charCodeAt(++i)&255)<<8|(t.charCodeAt(++i)&255)<<16|(t.charCodeAt(++i)&255)<<24,s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16),s^=s>>>24,s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16),o=(o&65535)*1540483477+(((o>>>16)*1540483477&65535)<<16)^s,r-=4,++i;switch(r){case 3:o^=(t.charCodeAt(i+2)&255)<<16;case 2:o^=(t.charCodeAt(i+1)&255)<<8;case 1:o^=t.charCodeAt(i)&255,o=(o&65535)*1540483477+(((o>>>16)*1540483477&65535)<<16)}return o^=o>>>13,o=(o&65535)*1540483477+(((o>>>16)*1540483477&65535)<<16),o^=o>>>15,o>>>0}n(lp,"murmurhash2_32_gc");typeof Ko!==void 0&&(Ko.exports=lp)});var na=J((Dg,Gr)=>{var oa=ta(),pp=ra();Gr.exports=oa;Gr.exports.murmur3=oa;Gr.exports.murmur2=pp});var Iu={};Rn(Iu,{addOptinChangedCallback:()=>pu,addTemplate:()=>uu,autoInit:()=>Au,clear:()=>du,config:()=>fu,default:()=>Nu,disableOptinChangedCallbacks:()=>hu,getOptins:()=>mu,getProductsForPurchasePost:()=>gu,initialize:()=>yu,isReady:()=>lu,offers:()=>O,platform:()=>q,previewMode:()=>bu,register:()=>_u,resolveSettings:()=>Su,setAuthUrl:()=>Eu,setEnvironment:()=>xu,setLocale:()=>vu,setMerchantId:()=>Ou,setPublicPath:()=>Tu,setTemplates:()=>Pu,setupCart:()=>wu,setupProduct:()=>Cu,setupProducts:()=>Ru,store:()=>Aa});function Xr(t){var e,r=t.Symbol;return typeof r=="function"?r.observable?e=r.observable:(e=r("observable"),r.observable=e):e="@@observable",e}n(Xr,"symbolObservablePonyfill");var Ue;typeof self<"u"?Ue=self:typeof window<"u"||typeof window<"u"?Ue=window:typeof module<"u"?Ue=module:Ue=Function("return this")();var La=Xr(Ue),eo=La;var to=n(function(){return Math.random().toString(36).substring(7).split("").join(".")},"randomString"),ft={INIT:"@@redux/INIT"+to(),REPLACE:"@@redux/REPLACE"+to(),PROBE_UNKNOWN_ACTION:n(function(){return"@@redux/PROBE_UNKNOWN_ACTION"+to()},"PROBE_UNKNOWN_ACTION")};function Ma(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}n(Ma,"isPlainObject");function ro(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error("Expected the enhancer to be a function.");return r(ro)(t,e)}if(typeof t!="function")throw new Error("Expected the reducer to be a function.");var i=t,s=e,a=[],c=a,l=!1;function p(){c===a&&(c=a.slice())}n(p,"ensureCanMutateNextListeners");function d(){if(l)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return s}n(d,"getState");function u(m){if(typeof m!="function")throw new Error("Expected the listener to be a function.");if(l)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var b=!0;return p(),c.push(m),n(function(){if(!!b){if(l)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");b=!1,p();var E=c.indexOf(m);c.splice(E,1),a=null}},"unsubscribe")}n(u,"subscribe");function h(m){if(!Ma(m))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(typeof m.type>"u")throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(l)throw new Error("Reducers may not dispatch actions.");try{l=!0,s=i(s,m)}finally{l=!1}for(var b=a=c,T=0;T<b.length;T++){var E=b[T];E()}return m}n(h,"dispatch");function _(m){if(typeof m!="function")throw new Error("Expected the nextReducer to be a function.");i=m,h({type:ft.REPLACE})}n(_,"replaceReducer");function S(){var m,b=u;return m={subscribe:n(function(E){if(typeof E!="object"||E===null)throw new TypeError("Expected the observer to be an object.");function w(){E.next&&E.next(d())}n(w,"observeState"),w();var C=b(w);return{unsubscribe:C}},"subscribe")},m[eo]=function(){return this},m}return n(S,"observable"),h({type:ft.INIT}),o={dispatch:h,subscribe:u,getState:d,replaceReducer:_},o[eo]=S,o}n(ro,"createStore");function $a(t,e){var r=e&&e.type,o=r&&'action "'+String(r)+'"'||"an action";return"Given "+o+', reducer "'+t+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}n($a,"getUndefinedStateErrorMessage");function Va(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:ft.INIT});if(typeof o>"u")throw new Error('Reducer "'+e+`" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof r(void 0,{type:ft.PROBE_UNKNOWN_ACTION()})>"u")throw new Error('Reducer "'+e+'" returned undefined when probed with a random type. '+("Don't try to handle "+ft.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.")})}n(Va,"assertReducerShape");function $t(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var i=e[o];typeof t[i]=="function"&&(r[i]=t[i])}var s=Object.keys(r),a,c;try{Va(r)}catch(l){c=l}return n(function(p,d){if(p===void 0&&(p={}),c)throw c;if(!1)var u;for(var h=!1,_={},S=0;S<s.length;S++){var m=s[S],b=r[m],T=p[m],E=b(T,d);if(typeof E>"u"){var w=$a(m,d);throw new Error(w)}_[m]=E,h=h||E!==T}return h=h||s.length!==Object.keys(p).length,h?_:p},"combination")}n($t,"combineReducers");function Nn(t,e){return function(){return e(t.apply(this,arguments))}}n(Nn,"bindActionCreator");function kn(t,e){if(typeof t=="function")return Nn(t,e);if(typeof t!="object"||t===null)throw new Error("bindActionCreators expected an object or a function, instead received "+(t===null?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var r={};for(var o in t){var i=t[o];typeof i=="function"&&(r[o]=Nn(i,e))}return r}n(kn,"bindActionCreators");function ja(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}n(ja,"_defineProperty");function In(t,e){var r=Object.keys(t);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(t)),e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r}n(In,"ownKeys");function Ha(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?In(r,!0).forEach(function(o){ja(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):In(r).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}n(Ha,"_objectSpread2");function oo(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,i){return function(){return o(i.apply(void 0,arguments))}})}n(oo,"compose");function qn(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var i=o.apply(void 0,arguments),s=n(function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},"dispatch"),a={getState:i.getState,dispatch:n(function(){return s.apply(void 0,arguments)},"dispatch")},c=e.map(function(l){return l(a)});return s=oo.apply(void 0,c)(i.dispatch),Ha({},i,{dispatch:s})}}}n(qn,"applyMiddleware");function Dn(t){var e=n(function(o){var i=o.dispatch,s=o.getState;return function(a){return function(c){return typeof c=="function"?c(i,s,t):a(c)}}},"middleware");return e}n(Dn,"createThunkMiddleware");var Fn=Dn();Fn.withExtraArgument=Dn;var Un=Fn;var Ii=se(jt());var Mn=/^og_auth=/,Ga=n((t=Mn)=>(document.cookie.split(/;\s*/).find(e=>e.match(t))||"").replace(Mn,""),"c"),Ht=n(t=>{if(typeof t=="object")return t;let e=String(t||"").split("|");return e.length===3?{sig_field:e[0],ts:parseInt(e[1],10),sig:e[2]}:null},"r"),Ba=n(t=>new Promise((e,r)=>{let o=document.createElement("iframe");o.style.setProperty("display","none","important"),document.body.appendChild(o),o.onload=e,o.onerror=r,o.src=t}),"p"),za=n(t=>(t.headers.get("content-type")||"").indexOf("application/json")!==-1,"d");function $n(){return typeof window.og_auth<"u"?Ht(window.og_auth):null}n($n,"a");async function Ya(t=100){return new Promise(e=>{setTimeout(()=>e($n()),t)})}n(Ya,"f");async function Vn(t,e=Ga,r=Ba){let o;if(o=Ht($n())||Ht(e()),o)return o;if(t&&typeof t=="string"){let i=await fetch(t);i.status>=200&&i.status<300&&(o=e()||await(za(i)?i.json():Promise.resolve(r(t)).then(e)))}else o||(o=await Ya());if(o=Ht(o),o)return o;throw new Error("Unauthorized")}n(Vn,"u");var R="OPTIN_PRODUCT",I="OPTOUT_PRODUCT",k="PRODUCT_CHANGE_FREQUENCY",ae="PRODUCT_CHANGE_PREPAID_SHIPMENTS",Le="SET_MERCHANT_ID",K="REQUEST_OFFER",P="RECEIVE_OFFER",ht="PRODUCT_HAS_CHANGED",Me="CREATED_SESSION_ID",Gt="SET_AUTH_URL",jn="REQUEST_AUTH",Bt="AUTHORIZE",xe="UNAUTHORIZED",Hn="REQUEST_ORDERS",zt="RECEIVE_ORDERS",mt="CART_PRODUCT_KEY_HAS_CHANGED",Yt="RECEIVE_ORDER_ITEMS",Gn="FETCH_RESPONSE_ERROR",$e="SET_ENVIRONMENT_LOCAL",Ve="SET_ENVIRONMENT_STAGING",je="SET_ENVIRONMENT_DEV",He="SET_ENVIRONMENT_PROD",Bn="READY",zn="CONCLUDE_UPSELL",Yn="REQUEST_CREATE_IU_ORDER",Wt="CREATE_ONE_TIME",Wn="REQUEST_CONVERT_ONE_TIME",Jt="CONVERT_ONE_TIME";var Ge="CHECKOUT",Jn="RECEIVE_FETCH",Kt="SET_LOCALE",Be="SET_CONFIG",ue="SET_PREVIEW_STANDARD_OFFER",gt="SET_PREVIEW_UPSELL_OFFER",no="SET_PREVIEW_PREPAID_OFFER",Qt="ADD_TEMPLATE",Zt="SET_TEMPLATES",ve="LOCAL_STORAGE_CHANGE",de="LOCAL_STORAGE_CLEAR",Xt="SET_FIRST_ORDER_PLACE_DATE",er="SET_PRODUCT_TO_SUBSCRIBE",B="RECEIVE_PRODUCT_PLANS",Q="SETUP_PRODUCT",fe="SETUP_CART",ce="RECEIVE_MERCHANT_SETTINGS",io="SET_EXPERIMENT_VARIANT",Oe="pdp",Kn="local",tr="dev",Te="staging",Pe="prod",rr="static.ordergroove.com",or="staging.static.ordergroove.com",Qn="og-cart-updated";var sr=se(_t());var lo=n((...t)=>JSON.stringify(t),"memoizeKey"),St=n(t=>(...e)=>fetch(...t(...e)).then(r=>r.json()),"withFetchJson"),Et=n(t=>(e,...r)=>{if(!e)throw Error("host required");let[o,i={}]=t(...r);return[`${e.replace(/\/+$/,"")}${o}`,i]},"withHost"),ar=n(t=>(e,...r)=>{if(!e)throw Error("auth required");let[o,i={}]=t(...r);return[o,{...i,headers:{Authorization:JSON.stringify(e),...i.headers}}]},"withAuth"),si=n(t=>(...e)=>{let[r,o={}]=t(...e);return[r,{method:"POST",...o,body:JSON.stringify(o.body),headers:{"Content-type":"application/json",...o.headers}}]},"withJsonBody"),ai=n((t=[])=>(Array.isArray(t)?t:Object.entries(t)).map(([e,r])=>[e,encodeURIComponent(r)].join("=")).join("&"),"toQuery"),Ac=n(t=>JSON.stringify([].concat(t).map(e=>typeof e=="object"?e.id:e).filter(e=>e)),"toProductId"),Nc=(0,sr.default)(St(Et((t,e,r,o="pdp",i={})=>{var l;if(!t)throw Error("merchantId required");if(!e)throw Error("sessionId required");if(!r)throw Error("product required");let s=[["session_id",e],["page_type",1],["p",Ac(r)],["module_view",JSON.stringify(["regular"])]],{experiments:a}=i,c=(l=a==null?void 0:a.variants)==null?void 0:l.at(a.currentVariant);return c&&s.push(["variant",c.public_id]),[`/offer/${t}/${o}?${ai(s)}`]})),lo),Ic=(0,sr.default)(St(Et(ar((t=1,e="place")=>[`/orders/?${ai([["status",t],["ordering",e],["exclude_prepaid_orders","true"]])}`]))),lo),kc=(0,sr.default)(St(Et(ar(t=>{if(!t)throw Error("orderId required");return[`/items/?order=${t}`]}))),lo),qc=St(Et(ar(si((t,e,r,o)=>{if(!t)throw Error("product required");if(!e)throw Error("order required");if(!r)throw Error("quantity required");if(r<=0)throw Error("quantity must be greater or equal than one");if(!o)throw Error("offer required");return["/items/iu/",{body:{product:t,order:e,quantity:r,offer:o}}]})))),xt=n(t=>{if(typeof t=="object")return{...t};let[e,r]=(t||"").split(/_/).map(o=>parseInt(o,10));return e&&r&&{every:e,every_period:r}},"parseFrequency"),po=n(t=>t.match(/^\d+_\d$/),"isFrequencyValid"),Dc=n((t,e)=>String.prototype.localeCompare.call(t&&t.split("_").reverse().join("_"),e&&e.split("_").reverse().join("_")),"compareFrequencies"),ci=n(t=>[...new Set(t&&t.split(/\s+/))].filter(po).sort(Dc),"parseFrequenciesList");var vt=n(t=>{if(typeof t=="object"){let{every:e,period:r,every_period:o}=t;return`${e}_${r||o}`}return typeof t=="string"?t:""},"stringifyFrequency"),Fc=St(Et(ar(si((t,e,r,o)=>{if(!t)throw Error("item required");if(!e)throw Error("frequency required");let i=xt(e);if(!i)throw Error("invalid frequency");return["/subscriptions/create_from_item/",{body:{item:t.public_id,offer:r,session_id:o,...i}}]})))),he={fetchOffer:Nc,fetchOrders:Ic,fetchItems:kc,createOneTime:qc,convertOneTimeToSubscription:Fc};var uo=Ot(),q={shopify:typeof window.Shopify!="undefined",shopify_selling_plans:typeof(uo==null?void 0:uo.dataset.shopifySellingPlans)!="undefined"};function Uc(t,e){return t===e}n(Uc,"defaultEqualityCheck");function Lc(t,e,r){if(e===null||r===null||e.length!==r.length)return!1;for(var o=e.length,i=0;i<o;i++)if(!t(e[i],r[i]))return!1;return!0}n(Lc,"areArgumentsShallowlyEqual");function Mc(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Uc,r=null,o=null;return function(){return Lc(e,r,arguments)||(o=t.apply(null,arguments)),r=arguments,o}}n(Mc,"defaultMemoize");function $c(t){var e=Array.isArray(t[0])?t[0]:t;if(!e.every(function(o){return typeof o=="function"})){var r=e.map(function(o){return typeof o}).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, "+("instead received the following types: ["+r+"]"))}return e}n($c,"getDependencies");function Vc(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];return function(){for(var i=arguments.length,s=Array(i),a=0;a<i;a++)s[a]=arguments[a];var c=0,l=s.pop(),p=$c(s),d=t.apply(void 0,[function(){return c++,l.apply(null,arguments)}].concat(r)),u=t(function(){for(var h=[],_=p.length,S=0;S<_;S++)h.push(p[S].apply(null,arguments));return d.apply(null,h)});return u.resultFunc=l,u.dependencies=p,u.recomputations=function(){return c},u.resetRecomputations=function(){return c=0},u}}n(Vc,"createSelectorCreator");var Z=Vc(Mc);var z=se(_t());z.default.Cache=Map;function jc(t,e){if(t===e)return!0;if(t===null||e===null||t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0}n(jc,"arraysEqual");function Hc(t,e,r){let o=vt(r);return q.shopify_selling_plans?re(t,e,o):o}n(Hc,"resolveFrequency");var A=n((t,e)=>!!(t===e||typeof t=="object"&&typeof e=="object"&&t&&e&&t.id===e.id&&(!(Array.isArray(t.components)&&Array.isArray(e.components))||jc((t.components||[]).sort(),(e.components||[]).sort()))),"isSameProduct"),Tt=n(t=>t.optedin||[],"optedinSelector"),li=n(t=>t.optedout||[],"optedoutSelector"),fo=n(t=>t.autoshipByDefault||{},"autoshipSelector"),Gc=n(t=>t.defaultFrequencies||{},"defaultFrequenciesSelector"),Bc=n(t=>{var e;return((e=t==null?void 0:t.config)==null?void 0:e.frequencies)||[]},"sellingPlansSelector"),zc=n(t=>{var e;return((e=t==null?void 0:t.config)==null?void 0:e.frequenciesEveryPeriod)||[]},"frequenciesEveryPeriodSelector"),Yc=n(t=>{var e;return((e=t==null?void 0:t.config)==null?void 0:e.prepaidSellingPlans)||[]},"prepaidSellingPlansSelector"),Wc=n(t=>(t==null?void 0:t.prepaidShipmentsSelected)||{},"prepaidShipmentsSelectedSelector"),X=(0,z.default)(t=>Z(Tt,li,fo,(e,r,o)=>{let i=e.find(s=>A(t,s));return i||(r.find(s=>A(t,s))?!1:t&&o[t.id]?{id:t.id}:!1)}),t=>JSON.stringify(t)),cr=(0,z.default)(t=>Z(Tt,e=>{let r=e.find(o=>A(t,o));return r||!1}),t=>JSON.stringify(t)),pi=(0,z.default)(t=>Z(Tt,e=>e.some(r=>A(t,r)&&r.prepaidShipments)),t=>JSON.stringify(t)),ee=(0,z.default)(t=>Z(Wc,e=>e[t.id]||null),t=>JSON.stringify(t)),lr=(0,z.default)(t=>Z(li,e=>e.find(r=>A(t,r))));var te=(0,z.default)(t=>Z(X(t),e=>e&&e.frequency||null)),U=(0,z.default)(t=>Z(X(t),e=>e&&e.prepaidShipments||null)),L=(0,z.default)(t=>Z(Yc,e=>{var o;return(((o=e[x(t)])==null?void 0:o.map(({numberShipments:i})=>i))||[]).sort((i,s)=>i-s)})),Ye=(0,z.default)(t=>Z(Gc,Bc,zc,(e,r,o)=>e[x(t)]&&Hc(r,o,e[x(t)])||null)),ho=n(t=>t.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),"kebabCase"),M=n((t,e,r,o)=>({[r]:t.config&&t.config[r]||e&&e.hasAttribute&&e.hasAttribute(ho(r))&&e[r]||e.offer&&typeof(e.offer[r]!=="undefined")&&e.offer[r]||o}),"configSelector"),We=n(t=>({templates:t.templates||[]}),"templatesSelector");function pr(t){document.readyState==="loading"?window.addEventListener("DOMContentLoaded",t):t()}n(pr,"onReady");function Ot(){return document.querySelector([`script[src^="https://${rr}"]`,`script[src^="https://${or}"]`,`script[src^="http://${rr}"]`,`script[src^="http://${or}"]`].join(","))}n(Ot,"getMainJs");function mo(){let t=Ot();if(!t)return[];let e=new URL(t.src),r=e.host.startsWith(Te)?Te:Pe,o=e.pathname.split("/")[1];return!r&&!o?[]:[o,r,t]}n(mo,"resolveEnvAndMerchant");var x=n(t=>{var r;if(!t)return"";let e=`${t.id||t}`;return(r=q)!=null&&r.shopify_selling_plans&&(e=e.split(":")[0]),e},"safeProductId"),ui=n((t,e)=>{var r;if(q.shopify_selling_plans){let o=(r=e.frequencies)==null?void 0:r.indexOf(t);if(o>=0&&e.frequenciesEveryPeriod[o])return e.frequenciesEveryPeriod[o]}return t},"safeOgFrequency"),Pt=n((t,e)=>{var o,i,s;if(!`${t}`.includes("_"))return t;let r=(o=e.frequenciesEveryPeriod)==null?void 0:o.indexOf(t);return r>=0&&e.frequenciesEveryPeriod[r]?e.frequencies[r]:((i=e.frequencies)==null?void 0:i.length)>0&&((s=e.frequenciesEveryPeriod)==null?void 0:s.length)>0?(console.warn(`Unable to find selling plan match for frequency ${t}; falling back to first selling plan`),e.frequencies[0]):t},"frequencyToSellingPlan");function di(t){if(t.isReady())return;console.info("OG offers are auto initializing");let[e,r]=mo();if(!r&&!e)return;let o=document.createElement("script");o.onload=()=>console.info("OG pull initialization chunk for merchant",e,r),o.onerror=()=>t.initialize(e,r),o.src=`${window.location.protocol}//${r===Pe?rr:or}/${e}/main.js?initOnly=true`,document.head.appendChild(o)}n(di,"autoInitializeOffers");var fi=n(t=>{document.cookie=`${t}=; expires=Thu, 01 Jan 1970 00:00:01 GMT;`},"clearCookie");function hi(t){let e=document.cookie.match(`(^|;) ?${t}=([^;]*)(;|$)`);return e?e[2]:null}n(hi,"getCookieValue");var Je=n(t=>!!(t&&(t==null?void 0:t.includes("_"))),"isOgFrequency"),me=n((t=[])=>(t==null?void 0:t[0])||null,"getFirstSellingPlan"),ur=n((t=[],e=[])=>{var r;return!!(((r=q)==null?void 0:r.shopify_selling_plans)&&t.length&&e.length)},"hasShopifySellingPlans"),re=n((t,e,r)=>{if(t.length!==e.length)return null;let o=e.findIndex(i=>i===r);return o>=0?t[o]:null},"mapFrequencyToSellingPlan");function go(t,e,r){let o=t.querySelector(`[name="${e}"]`);if(o&&!r){o.remove();return}!o&&r&&(o=document.createElement("input"),o.type="hidden",o.name=e,t.appendChild(o)),o&&(o.value=r)}n(go,"getOrCreateHidden");function Ke(t,e){let[[r],o]=t.reduce((i,s)=>i[A(e,s)?0:1].push(s)&&i,[[],[]]);return[r||{},o||[]]}n(Ke,"getMatchingProductIfExists");var Y=n((t,e,r)=>({type:R,payload:{product:t,frequency:e,offer:r}}),"optinProduct"),Qe=n((t,e)=>({type:I,payload:{product:t,offer:e}}),"optoutProduct"),mi=n((t,e)=>({type:ht,payload:{newProduct:t,product:e}}),"productHasChangedComponents"),dr=n((t,e,r)=>({type:k,payload:{product:t,frequency:e,offer:r}}),"productChangeFrequency"),ye=n((t,e,r)=>({type:ae,payload:{product:t,prepaidShipments:e,offer:r}}),"productChangePrepaidShipments");var gi=n(t=>({type:zn,payload:{product:t}}),"concludeUpsell"),yi=n(t=>({type:Le,payload:t}),"setMerchantId"),bo=n(t=>({type:Me,payload:`${t}.${Math.floor(Math.random()*999999)}.${Math.round(new Date().getTime()/1e3)}`}),"createSessionId"),Jc=n(t=>({type:jn,payload:t}),"requestAuth"),wt=n((t,e,r,o)=>({type:Bt,payload:{public_id:t,sig_field:e,ts:r,sig:o}}),"authorize"),ge=n(t=>({type:xe,payload:t}),"unauthorized"),bi=n(t=>({type:Gt,payload:t}),"setAuthUrl"),fr=n(t=>({type:Jn,payload:t}),"fetchDone"),_i=n((t=Vn)=>n(function(r,o){if(window.og&&window.og.previewMode)return r(ge({message:"Offers are running in preview mode"}));let{merchantId:i,authUrl:s}=o(),a=Jc(s);return r(a),t(s).then(({sig_field:c,ts:l,sig:p})=>r(wt(i,c,l,p)),c=>r(ge(c))).finally(()=>r(fr(a)))},"fetchAuthThunk"),"fetchAuth"),Kc=n((t,e)=>({type:Hn,payload:{status:t,ordering:e}}),"requestOrders"),_o=n(t=>({type:zt,payload:t}),"receiveOrders"),So=n(t=>({type:Yt,payload:t}),"receiveItems"),hr=n((t=1,e="place")=>n(function(o,i){let{environment:{legoUrl:s},auth:a}=i();if(!a)return o(ge("No auth set."));let c=Kc(t,e);return o(c),he.fetchOrders(s,a,t,e).then(l=>{if(l.results){o(_o(l));let p=(l.results[0]||{}).public_id;if(p)return he.fetchItems(s,a,p).then(d=>o(So(d)))}return o(ge(l.detail)),null},l=>o(ge(l))).finally(()=>o(fr(c)))},"fetchOrdersThunk"),"fetchOrders"),Eo=n(t=>{switch(t){case Kn:return{type:$e,payload:t};case tr:return{type:je,payload:t};case Te:return{type:Ve,payload:t};case Pe:return{type:He,payload:t};default:throw new Error(`${t} is not a supported environment`)}},"setEnvironment"),Si=n(()=>(t,e)=>{let{merchantId:r,sessionId:o}=e();return(!o||r&&!o.startsWith(r))&&t(bo(r)),o},"requestSessionId"),Re=n((t,e)=>({type:P,payload:{...t,offer:e}}),"receiveOffer"),yo=n(t=>({type:Gn,payload:t}),"fetchResponseError"),Qc=n((t,e=Oe,r)=>({type:K,payload:{product:t,module:e,offer:r}}),"requestOffer"),Ei=n((t,e=Oe,r)=>n(function(i,s){let a=s(),{merchantId:c,sessionId:l,environment:{apiUrl:p}}=a,d=Qc(t,e,r);i(d);let u=x(t);return u?he.fetchOffer(p,c,l,u,e,a).then(h=>i(Re(h,r)),h=>i(yo(h))).finally(()=>i(fr(d))):null},"fetchOfferThunk"),"fetchOffer"),xi=n(()=>({type:Ge}),"checkout"),Zc=n((t,e,r,o)=>({type:Yn,payload:{product:t,order:e,quantity:r,offerId:o}}),"requestCreateOneTime"),Xc=n(t=>({type:Wt,payload:t}),"receiveCreateOneTime"),el=n((t,e)=>({type:Wn,payload:{item:t,frequency:e}}),"requestConvertOneTimeToSubscription"),tl=n((t,e)=>({type:Jt,payload:{response:t,product:e}}),"receiveConvertOneTime"),vi=n((t,e,r,o=!1,i=null)=>n(function(a,c){let{auth:l,config:p,environment:{legoUrl:d},previewUpsellOffer:u,offerId:h,sessionId:_}=c();if(!l)return a(ge("No auth set."));let S=ui(i,p),m=Zc(t,e,r,h);return a(m),(u?Promise.resolve({legoUrl:d,product:t,order:e,quantity:r,offer:h}):he.createOneTime(d,l,t.id,e,r,h)).then(b=>(a(Xc(b)),o?(a(el(b,S)),(u?Promise.resolve({item:b,frequency:S}):he.convertOneTimeToSubscription(d,l,b,S,h,_)).then(T=>a(tl(T,t)),T=>a(yo(T)))):b),b=>a(yo(b))).finally(()=>a(fr(m)))},"createIuThunk"),"createIu"),Oi=n(t=>({type:Kt,payload:t}),"setLocale"),Ti=n(t=>({type:Be,payload:t}),"setConfig"),Pi=n((t,e,r)=>({type:Qt,payload:{selector:t,markup:e,config:r}}),"addTemplate"),wi=n(t=>({type:Zt,payload:t}),"setTemplates"),Ci=n((t,e)=>({type:Xt,payload:{product:t,firstOrderPlaceDate:e}}),"setFirstOrderPlaceDate"),Ri=n((t,e)=>({type:er,payload:{product:t,productToSubscribe:e}}),"setProductToSubscribe"),Ai=n(t=>({type:ce,payload:t}),"receiveMerchantSettings");var Ct="OG_STATE",ki=n(t=>{try{return t===null?void 0:JSON.parse(t)}catch{return}},"safeParseState"),xo=n(()=>window.og&&window.og.previewMode,"isPreviewMode"),qi=n(()=>xo()?{}:ki(localStorage.getItem(Ct)),"loadState"),rl=n(t=>!t||!t.sessionId?!1:JSON.stringify({sessionId:t.sessionId,optedin:t.optedin,optedout:t.optedout,productOffer:t.productOffer,firstOrderPlaceDate:t.firstOrderPlaceDate,productToSubscribe:t.productToSubscribe}),"serializeState"),Di=n(t=>{if(xo())return;let e=rl(t);e&&localStorage.getItem(Ct)!==e&&localStorage.setItem(Ct,e)},"saveState"),Fi=n(t=>(0,Ii.throttle)(500,e=>{if(xo())return;let{key:r,newValue:o}=e;r===Ct&&o===null?(t.dispatch({type:de}),setTimeout(()=>t.dispatch(Si()),0)):r===Ct&&t.dispatch({type:ve,newValue:ki(o)})}),"listenLocalStorageChanges");var Li=se(jt());var ol=n((t,e,r=document)=>r.dispatchEvent(new CustomEvent(t,{detail:e})),"dispatchEvent"),Ui=n(t=>({payload:{product:{id:e,components:r}={}}={}}={})=>setTimeout(()=>ol("optin-changed",{productId:e,components:r,optedIn:t}),0),"dispatchOptinChangedEvent"),nl=[{expressions:[({type:t}={})=>t===R,({type:t}={})=>t===k],fn:Ui(!0)},{expressions:[({type:t}={})=>t===I],fn:Ui(!1)}],Mi=n(t=>e=>r=>{let o=t.getState();nl.forEach(i=>{i.expressions.some(s=>s(r,o))&&i.fn(r)}),e(r)},"dispatchMiddleware"),$i=n(t=>e=>r=>{var i;let o;switch(r.type){case P:case I:case R:case k:o=new CustomEvent(`og-${r.type.toLowerCase().replace(/_/g,"-")}`,{bubbles:!0,cancelable:!0,detail:r.payload}),(((i=r.payload)==null?void 0:i.offer)||document).dispatchEvent(o);break;default:}o!=null&&o.defaultPrevented||e(r)},"offerEvents"),Vi=n(t=>e=>r=>{e(r);let o=(0,Li.throttle)(500,()=>{Di({...t.getState()})});r.type!==ve&&o()},"localStorageMiddleware");var vo=n(()=>{let t,e;return[new Promise((r,o)=>{t=r,e=o}),t,e]},"waitFor");function ji(t){let[e,r]=vo(),[o,i]=vo(),[s,a]=vo();o.then(l=>{let{sessionId:p}=t.getState();!p||l&&!p.startsWith(l)?t.dispatch(bo(l)):a(p)});let c=Promise.all([o,e,s]);return c.then(()=>{var l;t.dispatch({type:Bn,payload:{}}),window.addEventListener("storage",Fi(t)),(l=t.getState().auth)!=null&&l.ts||t.dispatch(_i())}),l=>async p=>{$e===p.type||je===p.type||Ve===p.type||He===p.type?r(p.payload):Le===p.type?i(p.payload):Me===p.type?a(p.payload):await c,l(p)}}n(ji,"waitUntilOffersReady");function Hi(t,...e){if(window.og&&window.og.store)return window.og.store;let r=window.og&&window.og.previewMode,o=typeof window=="object"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({name:"Ordergroove Offers"}):oo,i=[ji,Un,Mi,$i],s={};if(!r)try{s=qi(),i.push(Vi)}catch{}let a=o(qn(...i,...e.filter(l=>l))),c=ro(t,s,a);return window.og=window.og||{},window.og.store=c,c}n(Hi,"makeStore");var il=Object.defineProperty,mr=n((t,e)=>il(t,"name",{value:e,configurable:!0}),"i"),sl=mr(t=>e=>t.indexOf(e.origin)>=0,"createIsMessageAllowed"),Bi=["https://rc3.ordergroove.com","https://rc3.stg.ordergroove.com","https://rc3-beta.stg.ordergroove.com","http://localhost:3000","http://localhost:3010","http://0.0.0.0:3010",window.location.origin],Gi=mr(t=>(e,r)=>{Bi.forEach(o=>t.postMessage({ogType:e,...r},o))},"createBroadcastMessage");function Oo(t=window.opener,e=window.og){let r=mr(o=>{let i=sl(Bi),s=Gi(o.source),a=o.data.options||{};if(i(o)&&o.data.ogType==="READY"){let c="//static.ordergroove.com/@ordergroove/offers-live-editor/0.6.7/dist/";c.startsWith("//")&&(c=window.location.protocol+c),c.endsWith("/")||(c+="/"),import(`${c}client.js`).then(({initializeClient:l})=>{l({isMessageAllowed:i,broadcastMessage:s,options:a,og:e}),window.removeEventListener("message",r)})}},"handleReady");t&&t!==window&&(window.addEventListener("message",r),Gi(t)("READY"))}n(Oo,"h");mr(Oo,"offersLiveEditor");var gr=null,al=n(t=>({dispatch:t}),"defaultMapDispatchToProps"),zi=n(t=>{if(!gr)throw new Error("Missing redux store.");return gr},"resolveStore"),cl=n((t,e)=>r=>{let{getState:o,dispatch:i}=zi(r),s=t?t(o(),r):{},a=e(i,r);Object.assign(r,s,a)},"createRecalcProps"),g=n((t,e=al)=>r=>{let i=cl(t,typeof e=="function"?e:s=>kn(e,s));return class extends r{get store(){return gr}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._storeUnsubscribe=zi(this).subscribe(()=>i(this)),i(this)}attributeChangedCallback(s,a,c){super.attributeChangedCallback&&super.attributeChangedCallback(s,a,c),this._storeUnsubscribe&&a!==c&&i(this)}disconnectedCallback(){this._storeUnsubscribe(),super.disconnectedCallback&&super.disconnectedCallback()}}},"connect"),Yi=n(t=>{gr=t},"setStore");var To=n((t={},e=[])=>(t.optedin||[]).map(r=>{let o={product:r.id,subscription_info:{components:r.components||[]},tracking_override:{offer:((t.productOffer||{})[r.id]||[])[0],...t.sessionId&&{session_id:t.sessionId},...xt(r.frequency)}};return t.firstOrderPlaceDate&&t.firstOrderPlaceDate[r.id]&&(o.subscription_info.first_order_place_date=t.firstOrderPlaceDate[r.id]),t.productToSubscribe&&t.productToSubscribe[r.id]&&(o.tracking_override.product=t.productToSubscribe[r.id]),o}).filter(r=>r.tracking_override.offer).filter(r=>e.length?e.includes(r.product):r),"getProductsForPurchasePost"),Ze=n((t={})=>{let e={};return Object.entries(t).forEach(([r,o])=>{Object.entries(o).forEach(([i,s])=>{let a={};s&&!Array.isArray(s)?a=s:a={frequency:i,prepaidShipments:null,regularPrice:s[0],subscriptionPrice:s[2],discountRate:s[1]},e[r]?e[r].push(a):e[r]=[a]})}),e},"getObjectStructuredProductPlans");var Po=typeof window<"u"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0;var Ae=n((t,e,r=null)=>{for(;e!==r;){let o=e.nextSibling;t.removeChild(e),e=o}},"removeNodes");var $=`{{lit-${String(Math.random()).slice(2)}}}`,wo=`<!--${$}-->`,Wi=new RegExp(`${$}|${wo}`),Xe="$lit$",be=class{constructor(e,r){this.parts=[],this.element=r;let o=[],i=[],s=document.createTreeWalker(r.content,133,null,!1),a=0,c=-1,l=0,{strings:p,values:{length:d}}=e;for(;l<d;){let u=s.nextNode();if(u===null){s.currentNode=i.pop();continue}if(c++,u.nodeType===1){if(u.hasAttributes()){let h=u.attributes,{length:_}=h,S=0;for(let m=0;m<_;m++)Ji(h[m].name,Xe)&&S++;for(;S-- >0;){let m=p[l],b=yr.exec(m)[2],T=b.toLowerCase()+Xe,E=u.getAttribute(T);u.removeAttribute(T);let w=E.split(Wi);this.parts.push({type:"attribute",index:c,name:b,strings:w}),l+=w.length-1}}u.tagName==="TEMPLATE"&&(i.push(u),s.currentNode=u.content)}else if(u.nodeType===3){let h=u.data;if(h.indexOf($)>=0){let _=u.parentNode,S=h.split(Wi),m=S.length-1;for(let b=0;b<m;b++){let T,E=S[b];if(E==="")T=oe();else{let w=yr.exec(E);w!==null&&Ji(w[2],Xe)&&(E=E.slice(0,w.index)+w[1]+w[2].slice(0,-Xe.length)+w[3]),T=document.createTextNode(E)}_.insertBefore(T,u),this.parts.push({type:"node",index:++c})}S[m]===""?(_.insertBefore(oe(),u),o.push(u)):u.data=S[m],l+=m}}else if(u.nodeType===8)if(u.data===$){let h=u.parentNode;(u.previousSibling===null||c===a)&&(c++,h.insertBefore(oe(),u)),a=c,this.parts.push({type:"node",index:c}),u.nextSibling===null?u.data="":(o.push(u),c--),l++}else{let h=-1;for(;(h=u.data.indexOf($,h+1))!==-1;)this.parts.push({type:"node",index:-1}),l++}}for(let u of o)u.parentNode.removeChild(u)}};n(be,"Template");var Ji=n((t,e)=>{let r=t.length-e.length;return r>=0&&t.slice(r)===e},"endsWith"),Rt=n(t=>t.index!==-1,"isTemplatePartActive"),oe=n(()=>document.createComment(""),"createMarker"),yr=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;var Co=133;function Ro(t,e){let{element:{content:r},parts:o}=t,i=document.createTreeWalker(r,Co,null,!1),s=At(o),a=o[s],c=-1,l=0,p=[],d=null;for(;i.nextNode();){c++;let u=i.currentNode;for(u.previousSibling===d&&(d=null),e.has(u)&&(p.push(u),d===null&&(d=u)),d!==null&&l++;a!==void 0&&a.index===c;)a.index=d!==null?-1:a.index-l,s=At(o,s),a=o[s]}p.forEach(u=>u.parentNode.removeChild(u))}n(Ro,"removeNodesFromTemplate");var pl=n(t=>{let e=t.nodeType===11?0:1,r=document.createTreeWalker(t,Co,null,!1);for(;r.nextNode();)e++;return e},"countNodes"),At=n((t,e=-1)=>{for(let r=e+1;r<t.length;r++){let o=t[r];if(Rt(o))return r}return-1},"nextActiveIndexInTemplateParts");function Ki(t,e,r=null){let{element:{content:o},parts:i}=t;if(r==null){o.appendChild(e);return}let s=document.createTreeWalker(o,Co,null,!1),a=At(i),c=0,l=-1;for(;s.nextNode();)for(l++,s.currentNode===r&&(c=pl(e),r.parentNode.insertBefore(e,r));a!==-1&&i[a].index===l;){if(c>0){for(;a!==-1;)i[a].index+=c,a=At(i,a);return}a=At(i,a)}}n(Ki,"insertNodeIntoTemplate");var ul=new WeakMap;var Ne=n(t=>typeof t=="function"&&ul.has(t),"isDirective");var D={},br={};var le=class{constructor(e,r,o){this.__parts=[],this.template=e,this.processor=r,this.options=o}update(e){let r=0;for(let o of this.__parts)o!==void 0&&o.setValue(e[r]),r++;for(let o of this.__parts)o!==void 0&&o.commit()}_clone(){let e=Po?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),r=[],o=this.template.parts,i=document.createTreeWalker(e,133,null,!1),s=0,a=0,c,l=i.nextNode();for(;s<o.length;){if(c=o[s],!Rt(c)){this.__parts.push(void 0),s++;continue}for(;a<c.index;)a++,l.nodeName==="TEMPLATE"&&(r.push(l),i.currentNode=l.content),(l=i.nextNode())===null&&(i.currentNode=r.pop(),l=i.nextNode());if(c.type==="node"){let p=this.processor.handleTextExpression(this.options);p.insertAfterNode(l.previousSibling),this.__parts.push(p)}else this.__parts.push(...this.processor.handleAttributeExpressions(l,c.name,c.strings,this.options));s++}return Po&&(document.adoptNode(e),customElements.upgrade(e)),e}};n(le,"TemplateInstance");var Qi=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:t=>t}),fl=` ${$} `,ne=class{constructor(e,r,o,i){this.strings=e,this.values=r,this.type=o,this.processor=i}getHTML(){let e=this.strings.length-1,r="",o=!1;for(let i=0;i<e;i++){let s=this.strings[i],a=s.lastIndexOf("<!--");o=(a>-1||o)&&s.indexOf("-->",a+1)===-1;let c=yr.exec(s);c===null?r+=s+(o?fl:wo):r+=s.substr(0,c.index)+c[1]+c[2]+Xe+c[3]+$}return r+=this.strings[e],r}getTemplateElement(){let e=document.createElement("template"),r=this.getHTML();return Qi!==void 0&&(r=Qi.createHTML(r)),e.innerHTML=r,e}};n(ne,"TemplateResult");var Sr=n(t=>t===null||!(typeof t=="object"||typeof t=="function"),"isPrimitive"),_r=n(t=>Array.isArray(t)||!!(t&&t[Symbol.iterator]),"isIterable"),Ie=class{constructor(e,r,o){this.dirty=!0,this.element=e,this.name=r,this.strings=o,this.parts=[];for(let i=0;i<o.length-1;i++)this.parts[i]=this._createPart()}_createPart(){return new et(this)}_getValue(){let e=this.strings,r=e.length-1,o=this.parts;if(r===1&&e[0]===""&&e[1]===""){let s=o[0].value;if(typeof s=="symbol")return String(s);if(typeof s=="string"||!_r(s))return s}let i="";for(let s=0;s<r;s++){i+=e[s];let a=o[s];if(a!==void 0){let c=a.value;if(Sr(c)||!_r(c))i+=typeof c=="string"?c:String(c);else for(let l of c)i+=typeof l=="string"?l:String(l)}}return i+=e[r],i}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}};n(Ie,"AttributeCommitter");var et=class{constructor(e){this.value=void 0,this.committer=e}setValue(e){e!==D&&(!Sr(e)||e!==this.value)&&(this.value=e,Ne(e)||(this.committer.dirty=!0))}commit(){for(;Ne(this.value);){let e=this.value;this.value=D,e(this)}this.value!==D&&this.committer.commit()}};n(et,"AttributePart");var ie=class{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(oe()),this.endNode=e.appendChild(oe())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=oe()),e.__insert(this.endNode=oe())}insertAfterPart(e){e.__insert(this.startNode=oe()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(this.startNode.parentNode===null)return;for(;Ne(this.__pendingValue);){let r=this.__pendingValue;this.__pendingValue=D,r(this)}let e=this.__pendingValue;e!==D&&(Sr(e)?e!==this.value&&this.__commitText(e):e instanceof ne?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):_r(e)?this.__commitIterable(e):e===br?(this.value=br,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){let r=this.startNode.nextSibling;e=e??"";let o=typeof e=="string"?e:String(e);r===this.endNode.previousSibling&&r.nodeType===3?r.data=o:this.__commitNode(document.createTextNode(o)),this.value=e}__commitTemplateResult(e){let r=this.options.templateFactory(e);if(this.value instanceof le&&this.value.template===r)this.value.update(e.values);else{let o=new le(r,e.processor,this.options),i=o._clone();o.update(e.values),this.__commitNode(i),this.value=o}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());let r=this.value,o=0,i;for(let s of e)i=r[o],i===void 0&&(i=new ie(this.options),r.push(i),o===0?i.appendIntoPart(this):i.insertAfterPart(r[o-1])),i.setValue(s),i.commit(),o++;o<r.length&&(r.length=o,this.clear(i&&i.endNode))}clear(e=this.startNode){Ae(this.startNode.parentNode,e.nextSibling,this.endNode)}};n(ie,"NodePart");var tt=class{constructor(e,r,o){if(this.value=void 0,this.__pendingValue=void 0,o.length!==2||o[0]!==""||o[1]!=="")throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=r,this.strings=o}setValue(e){this.__pendingValue=e}commit(){for(;Ne(this.__pendingValue);){let r=this.__pendingValue;this.__pendingValue=D,r(this)}if(this.__pendingValue===D)return;let e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=D}};n(tt,"BooleanAttributePart");var rt=class extends Ie{constructor(e,r,o){super(e,r,o),this.single=o.length===2&&o[0]===""&&o[1]===""}_createPart(){return new Nt(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}};n(rt,"PropertyCommitter");var Nt=class extends et{};n(Nt,"PropertyPart");var Zi=!1;(()=>{try{let t={get capture(){return Zi=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch{}})();var ot=class{constructor(e,r,o){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=r,this.eventContext=o,this.__boundHandleEvent=i=>this.handleEvent(i)}setValue(e){this.__pendingValue=e}commit(){for(;Ne(this.__pendingValue);){let s=this.__pendingValue;this.__pendingValue=D,s(this)}if(this.__pendingValue===D)return;let e=this.__pendingValue,r=this.value,o=e==null||r!=null&&(e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive),i=e!=null&&(r==null||o);o&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=hl(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=D}handleEvent(e){typeof this.value=="function"?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}};n(ot,"EventPart");var hl=n(t=>t&&(Zi?{capture:t.capture,passive:t.passive,once:t.once}:t.capture),"getOptions");function Ao(t){let e=ke.get(t.type);e===void 0&&(e={stringsArray:new WeakMap,keyString:new Map},ke.set(t.type,e));let r=e.stringsArray.get(t.strings);if(r!==void 0)return r;let o=t.strings.join($);return r=e.keyString.get(o),r===void 0&&(r=new be(t,t.getTemplateElement()),e.keyString.set(o,r)),e.stringsArray.set(t.strings,r),r}n(Ao,"templateFactory");var ke=new Map;var _e=new WeakMap,No=n((t,e,r)=>{let o=_e.get(e);o===void 0&&(Ae(e,e.firstChild),_e.set(e,o=new ie(Object.assign({templateFactory:Ao},r))),o.appendInto(e)),o.setValue(t),o.commit()},"render");var It=class{handleAttributeExpressions(e,r,o,i){let s=r[0];return s==="."?new rt(e,r.slice(1),o).parts:s==="@"?[new ot(e,r.slice(1),i.eventContext)]:s==="?"?[new tt(e,r.slice(1),o)]:new Ie(e,r,o).parts}handleTextExpression(e){return new ie(e)}};n(It,"DefaultTemplateProcessor");var Io=new It;typeof window<"u"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.3.0");var f=n((t,...e)=>new ne(t,e,"html",Io),"html");var es=n((t,e)=>`${t}--${e}`,"getTemplateCacheKey"),Er=!0;typeof window.ShadyCSS>"u"?Er=!1:typeof window.ShadyCSS.prepareTemplateDom>"u"&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),Er=!1);var gl=n(t=>e=>{let r=es(e.type,t),o=ke.get(r);o===void 0&&(o={stringsArray:new WeakMap,keyString:new Map},ke.set(r,o));let i=o.stringsArray.get(e.strings);if(i!==void 0)return i;let s=e.strings.join($);if(i=o.keyString.get(s),i===void 0){let a=e.getTemplateElement();Er&&window.ShadyCSS.prepareTemplateDom(a,t),i=new be(e,a),o.keyString.set(s,i)}return o.stringsArray.set(e.strings,i),i},"shadyTemplateFactory"),yl=["html","svg"],bl=n(t=>{yl.forEach(e=>{let r=ke.get(es(e,t));r!==void 0&&r.keyString.forEach(o=>{let{element:{content:i}}=o,s=new Set;Array.from(i.querySelectorAll("style")).forEach(a=>{s.add(a)}),Ro(o,s)})})},"removeStylesFromLitTemplates"),ts=new Set,_l=n((t,e,r)=>{ts.add(t);let o=r?r.element:document.createElement("template"),i=e.querySelectorAll("style"),{length:s}=i;if(s===0){window.ShadyCSS.prepareTemplateStyles(o,t);return}let a=document.createElement("style");for(let p=0;p<s;p++){let d=i[p];d.parentNode.removeChild(d),a.textContent+=d.textContent}bl(t);let c=o.content;r?Ki(r,a,c.firstChild):c.insertBefore(a,c.firstChild),window.ShadyCSS.prepareTemplateStyles(o,t);let l=c.querySelector("style");if(window.ShadyCSS.nativeShadow&&l!==null)e.insertBefore(l.cloneNode(!0),e.firstChild);else if(r){c.insertBefore(a,c.firstChild);let p=new Set;p.add(a),Ro(r,p)}},"prepareTemplateStyles"),rs=n((t,e,r)=>{if(!r||typeof r!="object"||!r.scopeName)throw new Error("The `scopeName` option is required.");let o=r.scopeName,i=_e.has(e),s=Er&&e.nodeType===11&&!!e.host,a=s&&!ts.has(o),c=a?document.createDocumentFragment():e;if(No(t,c,Object.assign({templateFactory:gl(o)},r)),a){let l=_e.get(c);_e.delete(c);let p=l.value instanceof le?l.value.template:void 0;_l(o,c,p),Ae(e,e.firstChild),e.appendChild(c),_e.set(e,l)}!i&&s&&window.ShadyCSS.styleElement(e.host)},"render");var os;window.JSCompiler_renameProperty=(t,e)=>t;var Lo={toAttribute(t,e){switch(e){case Boolean:return t?"":null;case Object:case Array:return t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){switch(e){case Boolean:return t!==null;case Number:return t===null?null:Number(t);case Object:case Array:return JSON.parse(t)}return t}},ns=n((t,e)=>e!==t&&(e===e||t===t),"notEqual"),ko={attribute:!0,type:String,converter:Lo,reflect:!1,hasChanged:ns},qo=1,Do=1<<2,Fo=1<<3,Uo=1<<4,Mo="finalized",nt=class extends HTMLElement{constructor(){super(),this.initialize()}static get observedAttributes(){this.finalize();let e=[];return this._classProperties.forEach((r,o)=>{let i=this._attributeNameForProperty(o,r);i!==void 0&&(this._attributeToPropertyMap.set(i,o),e.push(i))}),e}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;let e=Object.getPrototypeOf(this)._classProperties;e!==void 0&&e.forEach((r,o)=>this._classProperties.set(o,r))}}static createProperty(e,r=ko){if(this._ensureClassProperties(),this._classProperties.set(e,r),r.noAccessor||this.prototype.hasOwnProperty(e))return;let o=typeof e=="symbol"?Symbol():`__${e}`,i=this.getPropertyDescriptor(e,o,r);i!==void 0&&Object.defineProperty(this.prototype,e,i)}static getPropertyDescriptor(e,r,o){return{get(){return this[r]},set(i){let s=this[e];this[r]=i,this.requestUpdateInternal(e,s,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this._classProperties&&this._classProperties.get(e)||ko}static finalize(){let e=Object.getPrototypeOf(this);if(e.hasOwnProperty(Mo)||e.finalize(),this[Mo]=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){let r=this.properties,o=[...Object.getOwnPropertyNames(r),...typeof Object.getOwnPropertySymbols=="function"?Object.getOwnPropertySymbols(r):[]];for(let i of o)this.createProperty(i,r[i])}}static _attributeNameForProperty(e,r){let o=r.attribute;return o===!1?void 0:typeof o=="string"?o:typeof e=="string"?e.toLowerCase():void 0}static _valueHasChanged(e,r,o=ns){return o(e,r)}static _propertyValueFromAttribute(e,r){let o=r.type,i=r.converter||Lo,s=typeof i=="function"?i:i.fromAttribute;return s?s(e,o):e}static _propertyValueToAttribute(e,r){if(r.reflect===void 0)return;let o=r.type,i=r.converter;return(i&&i.toAttribute||Lo.toAttribute)(e,o)}initialize(){this._updateState=0,this._updatePromise=new Promise(e=>this._enableUpdatingResolver=e),this._changedProperties=new Map,this._saveInstanceProperties(),this.requestUpdateInternal()}_saveInstanceProperties(){this.constructor._classProperties.forEach((e,r)=>{if(this.hasOwnProperty(r)){let o=this[r];delete this[r],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(r,o)}})}_applyInstanceProperties(){this._instanceProperties.forEach((e,r)=>this[r]=e),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){this._enableUpdatingResolver!==void 0&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(e,r,o){r!==o&&this._attributeToProperty(e,o)}_propertyToAttribute(e,r,o=ko){let i=this.constructor,s=i._attributeNameForProperty(e,o);if(s!==void 0){let a=i._propertyValueToAttribute(r,o);if(a===void 0)return;this._updateState=this._updateState|Fo,a==null?this.removeAttribute(s):this.setAttribute(s,a),this._updateState=this._updateState&~Fo}}_attributeToProperty(e,r){if(this._updateState&Fo)return;let o=this.constructor,i=o._attributeToPropertyMap.get(e);if(i!==void 0){let s=o.getPropertyOptions(i);this._updateState=this._updateState|Uo,this[i]=o._propertyValueFromAttribute(r,s),this._updateState=this._updateState&~Uo}}requestUpdateInternal(e,r,o){let i=!0;if(e!==void 0){let s=this.constructor;o=o||s.getPropertyOptions(e),s._valueHasChanged(this[e],r,o.hasChanged)?(this._changedProperties.has(e)||this._changedProperties.set(e,r),o.reflect===!0&&!(this._updateState&Uo)&&(this._reflectingProperties===void 0&&(this._reflectingProperties=new Map),this._reflectingProperties.set(e,o))):i=!1}!this._hasRequestedUpdate&&i&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(e,r){return this.requestUpdateInternal(e,r),this.updateComplete}async _enqueueUpdate(){this._updateState=this._updateState|Do;try{await this._updatePromise}catch{}let e=this.performUpdate();return e!=null&&await e,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return this._updateState&Do}get hasUpdated(){return this._updateState&qo}performUpdate(){if(!this._hasRequestedUpdate)return;this._instanceProperties&&this._applyInstanceProperties();let e=!1,r=this._changedProperties;try{e=this.shouldUpdate(r),e?this.update(r):this._markUpdated()}catch(o){throw e=!1,this._markUpdated(),o}e&&(this._updateState&qo||(this._updateState=this._updateState|qo,this.firstUpdated(r)),this.updated(r))}_markUpdated(){this._changedProperties=new Map,this._updateState=this._updateState&~Do}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this._updatePromise}shouldUpdate(e){return!0}update(e){this._reflectingProperties!==void 0&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((r,o)=>this._propertyToAttribute(o,this[o],r)),this._reflectingProperties=void 0),this._markUpdated()}updated(e){}firstUpdated(e){}};n(nt,"UpdatingElement");os=Mo;nt[os]=!0;var is=Element.prototype,Ef=is.msMatchesSelector||is.webkitMatchesSelector;var xr=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$o=Symbol(),it=class{constructor(e,r){if(r!==$o)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){return this._styleSheet===void 0&&(xr?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}};n(it,"CSSResult");var ss=n(t=>new it(String(t),$o),"unsafeCSS"),Sl=n(t=>{if(t instanceof it)return t.cssText;if(typeof t=="number")return t;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${t}. Use 'unsafeCSS' to pass non-literal values, but
12
12
  take care to ensure page security.`)},"textFromCSSResult"),y=n((t,...e)=>{let r=e.reduce((o,i,s)=>o+Sl(i)+t[s+1],t[0]);return new it(r,$o)},"css");(window.litElementVersions||(window.litElementVersions=[])).push("2.4.0");var as={},v=class extends nt{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;let e=this.getStyles();if(Array.isArray(e)){let r=n((s,a)=>s.reduceRight((c,l)=>Array.isArray(l)?r(l,c):(c.add(l),c),a),"addStyles"),o=r(e,new Set),i=[];o.forEach(s=>i.unshift(s)),this._styles=i}else this._styles=e===void 0?[]:[e];this._styles=this._styles.map(r=>{if(r instanceof CSSStyleSheet&&!xr){let o=Array.prototype.slice.call(r.cssRules).reduce((i,s)=>i+s.cssText,"");return ss(o)}return r})}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){let e=this.constructor._styles;e.length!==0&&(window.ShadyCSS!==void 0&&!window.ShadyCSS.nativeShadow?window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map(r=>r.cssText),this.localName):xr?this.renderRoot.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):this._needsShimAdoptedStyleSheets=!0)}connectedCallback(){super.connectedCallback(),this.hasUpdated&&window.ShadyCSS!==void 0&&window.ShadyCSS.styleElement(this)}update(e){let r=this.render();super.update(e),r!==as&&this.constructor.render(r,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(o=>{let i=document.createElement("style");i.textContent=o.cssText,this.renderRoot.appendChild(i)}))}render(){return as}};n(v,"LitElement");v.finalized=!0;v.render=rs;var Ts=se(bs());var wl=n(t=>{let e=String(t||"").trim().match(/(\d+)\s*([dwm])/);return e?`${e[1]}_${{d:1,w:2,m:3}[e[2]]}`:t},"sanitizeFrequencyString"),_s=n(t=>t.hasAttribute("product")&&{id:t.getAttribute("product"),...t.hasAttribute("product-components")&&{components:JSON.parse(t.getAttribute("product-components"))}},"buildProduct");var kt=n(t=>{let e=_s(t);if(!e){let r=t.offer;r&&(e=_s(r))}return e},"resolveProduct"),Cl=n(t=>{let e=t;for(;e;){if(e.tagName==="OG-OFFER")return e;e=e.nodeType===11?e.host:e.parentNode}},"resolveOffer"),Vo=n(t=>class extends t{get offer(){return Cl(this)}connectedCallback(){super.connectedCallback(),this.offersChangeTemplate=this.offersChangeTemplate.bind(this),this.offer&&this.offer.addEventListener("template-changed",this.offersChangeTemplate)}disconnectedCallback(){super.disconnectedCallback(),this.offer&&this.offer.removeEventListener("template-changed",this.offersChangeTemplate)}offersChangeTemplate(){this._enqueueUpdate()}},"withOfferTemplate"),N=n(t=>class extends Vo(t){get product(){return kt(this)}},"withProduct"),Or=n(t=>class extends t{get childOptions(){let e=[],r=null;return this.querySelectorAll("option").forEach(o=>{let i=wl(o.value),s=o.innerText.trim();e.push({value:i,text:s}),!r&&o.selected&&(r=i)}),{options:e,isSelected:r}}},"withChildOptions");var Tr={};Rn(Tr,{autoshipByDefault:()=>Rl,eligibilityGroups:()=>Ho,eligible:()=>Ss,hasPrepaidOptions:()=>ql,hasUpcomingOrder:()=>vs,hasUpsellGroup:()=>xs,inStock:()=>jo,optedout:()=>Il,prepaidEligible:()=>Al,prepaidSubscribed:()=>kl,regularEligible:()=>Fl,subscribed:()=>Nl,subscriptionEligible:()=>Es,upcomingOrderContainsProduct:()=>Dl,upsellEligible:()=>Os});var jo=n((t,e)=>(t.inStock||{})[(e.product||{}).id],"inStock"),Ss=n((t,e)=>(t.autoshipEligible||{})[(e.product||{}).id]||!1,"eligible"),Rl=n((t,e)=>(t.autoshipByDefault||{})[(e.product||{}).id]||!1,"autoshipByDefault"),Es=n((t,e)=>(t.offerId&&t.offerId!=="0"||!1)&&Ss(t,e)&&jo(t,e),"subscriptionEligible"),Ho=n((t,e)=>{let r=x((e.product||{}).id);return(t.eligibilityGroups||{})[r]||null},"eligibilityGroups"),xs=n((t,e)=>{let r=Ho(t,e);return r===null||!!r.find(o=>o==="upsell"||o==="impulse_upsell")},"hasUpsellGroup"),Al=n((t,e)=>{let r=Ho(t,e);return(r==null?void 0:r.some(o=>o==="prepaid"))||!1},"prepaidEligible"),Nl=n((t,e)=>cr(e.product)(t),"subscribed"),Il=n((t,e)=>lr(e.product)(t),"optedout"),kl=n((t,e)=>pi(e.product)(t),"prepaidSubscribed"),ql=n((t,e)=>L(e.product.id)(t).length>0,"hasPrepaidOptions"),vs=n(t=>!!(t.nextUpcomingOrder&&t.nextUpcomingOrder.public_id),"hasUpcomingOrder"),Dl=n((t,e)=>(t.nextUpcomingOrder&&t.nextUpcomingOrder.products||[]).includes((e.product||{}).id),"upcomingOrderContainsProduct"),Os=n((t,e)=>{var r;return!((r=e.offer)!=null&&r.isCart)&&t.offerId&&t.offerId!=="0"&&t.auth&&jo(t,e)&&vs(t)&&xs(t,e)},"upsellEligible"),Fl=n((t,e)=>Es(t,e)&&!Os(t,e),"regularEligible");var Ul=n(t=>t.replace(/(\r\n|\n|\r|\s)+/gm,""),"removeWhitespace"),Pr=class extends N(v){static get properties(){return{...super.properties,state:{type:Object,attribute:!1},test:{type:String}}}render(){if(!this.test)return f``;let e=Ul(this.test);return e=e.replace(/(![a-zA-Z]+)/g,"($1)"),Ts.default.parse(e,o=>Tr[o]&&Tr[o](this.state,this))?f`
13
13
  <slot></slot>
14
14
  `:f``}shouldUpdate(e){return e.size&&(this.product&&this.product.id in this.state.autoshipEligible&&this.product.id in this.state.inStock||!this.product.id)}};n(Pr,"When");var Ll=n(t=>({state:t}),"mapStateToProps"),Ps=g(Ll)(Pr);var ws={type:Object,converter:{toAttribute(t){return t==null?t:JSON.stringify(t)},fromAttribute(t){return t&&t.match(/[{[]/)?JSON.parse(t):{id:t}}}},Ee={type:String,attribute:"default-frequency",converter:{fromAttribute(t){return t&&po(t)?t:null}}},wr={type:Boolean,attribute:!0,reflect:!0},ct={type:Object,attribute:!1};var Ml=n(t=>class extends t{getOption(e,r=e){let o=ho(e);if(this.hasAttribute(o)){let i=this.getAttribute(o);return i.toString().toLowerCase()==="true"?!0:i.toString().toLowerCase()==="false"?!1:i}if(this.template&&this.template.config&&typeof this.template.config[r]!="undefined")return this.template.config[r];if(this.config&&typeof this.config[r]!="undefined")return this.config[r]}applyTemplate(e){this.template=e;let r=typeof e.markup=="undefined"?this.constructor.initialTemplate:e.markup;r&&this._templateMarkup!==r&&(this._templateMarkup=r,this.innerHTML=r)}refreshTemplate(){if(this._templates&&this._templates.length){let e=this._templates.find(({selector:r})=>{try{return this.matches(r)}catch{return!1}});this.applyTemplate(e||{})}}set templates(e){this._templates=e,this.refreshTemplate()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this.constructor.initialTemplate&&!this.innerHTML.trim()&&(this.innerHTML=this.constructor.initialTemplate)}},"withTemplate"),j=Ml(v);var H=class extends N(j){static get properties(){return{subscribed:wr,frequencyMatch:{type:Boolean,reflect:!0,attribute:"frequency-match"},productDefaultFrequency:{type:String},defaultFrequency:{type:String},frequencies:{type:Array}}}static get styles(){return y`