(function(){"use strict";var Zt,k,di,gt,fi,pi,Nr,hi,Pn={},mi=[],gl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Ye(e,t){for(var n in t)e[n]=t[n];return e}function gi(e){var t=e.parentNode;t&&t.removeChild(e)}function $(e,t,n){var r,o,i,a={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?Zt.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)a[i]===void 0&&(a[i]=e.defaultProps[i]);return Yt(e,a,r,o,null)}function Yt(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++di};return o==null&&k.vnode!=null&&k.vnode(i),i}function bi(){return{current:null}}function Y(e){return e.children}function Te(e,t){this.props=e,this.context=t}function Qt(e,t){if(t==null)return e.__?Qt(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&>.sort(Nr));An.__r=0}function $i(e,t,n,r,o,i,a,s,c,u){var l,f,p,h,m,g,b,v=r&&r.__k||mi,y=v.length;for(n.__k=[],l=0;l0?Yt(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)!=null){if(h.__=n,h.__b=n.__b+1,(p=v[l])===null||p&&h.key==p.key&&h.type===p.type)v[l]=void 0;else for(f=0;f=0;t--)if((n=e.__k[t])&&(r=wi(n)))return r}return null}function bl(e,t,n,r,o){var i;for(i in n)i==="children"||i==="key"||i in t||Tn(e,i,null,n[i],r);for(i in t)o&&typeof t[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||n[i]===t[i]||Tn(e,i,t[i],n[i],r)}function xi(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||gl.test(t)?n:n+"px"}function Tn(e,t,n,r,o){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||xi(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||xi(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r||e.addEventListener(t,i?Si:Ci,i):e.removeEventListener(t,i?Si:Ci,i);else if(t!=="dangerouslySetInnerHTML"){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t.indexOf("-")==-1?e.removeAttribute(t):e.setAttribute(t,n))}}function Ci(e){return this.l[e.type+!1](k.event?k.event(e):e)}function Si(e){return this.l[e.type+!0](k.event?k.event(e):e)}function Br(e,t,n,r,o,i,a,s,c){var u,l,f,p,h,m,g,b,v,y,w,C,T,B,A,E=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(c=n.__h,s=t.__e=n.__e,t.__h=null,i=[s]),(u=k.__b)&&u(t);try{e:if(typeof E=="function"){if(b=t.props,v=(u=E.contextType)&&r[u.__c],y=u?v?v.props.value:u.__:r,n.__c?g=(l=t.__c=n.__c).__=l.__E:("prototype"in E&&E.prototype.render?t.__c=l=new E(b,y):(t.__c=l=new Te(b,y),l.constructor=E,l.render=$l),v&&v.sub(l),l.props=b,l.state||(l.state={}),l.context=y,l.__n=r,f=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),E.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Ye({},l.__s)),Ye(l.__s,E.getDerivedStateFromProps(b,l.__s))),p=l.props,h=l.state,l.__v=t,f)E.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(E.getDerivedStateFromProps==null&&b!==p&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(b,y),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(b,l.__s,y)===!1||t.__v===n.__v){for(t.__v!==n.__v&&(l.props=b,l.state=l.__s,l.__d=!1),l.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(K){K&&(K.__=t)}),w=0;w2&&(a.children=arguments.length>3?Zt.call(arguments,2):n),Yt(e.type,a,r||e.key,o||e.ref,null)}function ue(e,t){var n={__c:t="__cC"+hi++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&o.some(function(s){s.__e=!0,Dr(s)})},this.sub=function(a){o.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){o.splice(o.indexOf(a),1),s&&s.call(a)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}Zt=mi.slice,k={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(s){e=s}throw e}},di=0,Te.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ye({},this.state),typeof e=="function"&&(e=e(Ye({},n),this.props)),e&&Ye(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Dr(this))},Te.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Dr(this))},Te.prototype.render=Y,gt=[],pi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Nr=function(e,t){return e.__v.__b-t.__v.__b},An.__r=0,hi=0;var at,oe,zr,Ai,Nt=0,Ti=[],Rn=[],Ri=k.__b,Ii=k.__r,Ni=k.diffed,Di=k.__c,Bi=k.unmount;function bt(e,t){k.__h&&k.__h(oe,e,Nt||t),Nt=0;var n=oe.__H||(oe.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Rn}),n.__[e]}function M(e){return Nt=1,Re(Wi,e)}function Re(e,t,n){var r=bt(at++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Wi(void 0,t),function(s){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,s);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=oe,!oe.u)){var o=function(s,c,u){if(!r.__c.__H)return!0;var l=r.__c.__H.__.filter(function(p){return p.__c});if(l.every(function(p){return!p.__N}))return!i||i.call(this,s,c,u);var f=!1;return l.forEach(function(p){if(p.__N){var h=p.__[0];p.__=p.__N,p.__N=void 0,h!==p.__[0]&&(f=!0)}}),!(!f&&r.__c.props===s)&&(!i||i.call(this,s,c,u))};oe.u=!0;var i=oe.shouldComponentUpdate,a=oe.componentWillUpdate;oe.componentWillUpdate=function(s,c,u){if(this.__e){var l=i;i=void 0,o(s,c,u),i=l}a&&a.call(this,s,c,u)},oe.shouldComponentUpdate=o}return r.__N||r.__}function P(e,t){var n=bt(at++,3);!k.__s&&Lr(n.__H,t)&&(n.__=e,n.i=t,oe.__H.__h.push(n))}function Ie(e,t){var n=bt(at++,4);!k.__s&&Lr(n.__H,t)&&(n.__=e,n.i=t,oe.__h.push(n))}function I(e){return Nt=5,te(function(){return{current:e}},[])}function zi(e,t,n){Nt=6,Ie(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function te(e,t){var n=bt(at++,7);return Lr(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function X(e,t){return Nt=8,te(function(){return e},t)}function me(e){var t=oe.context[e.__c],n=bt(at++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(oe)),t.props.value):e.__}function Fi(e,t){k.useDebugValue&&k.useDebugValue(t?t(e):e)}function _l(e){var t=bt(at++,10),n=M();return t.__=e,oe.componentDidCatch||(oe.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Li(){var e=bt(at++,11);if(!e.__){for(var t=oe.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function wl(){for(var e;e=Ti.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(In),e.__H.__h.forEach(Fr),e.__H.__h=[]}catch(t){e.__H.__h=[],k.__e(t,e.__v)}}k.__b=function(e){oe=null,Ri&&Ri(e)},k.__r=function(e){Ii&&Ii(e),at=0;var t=(oe=e.__c).__H;t&&(zr===oe?(t.__h=[],oe.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Rn,n.__N=n.i=void 0})):(t.__h.forEach(In),t.__h.forEach(Fr),t.__h=[])),zr=oe},k.diffed=function(e){Ni&&Ni(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ti.push(t)!==1&&Ai===k.requestAnimationFrame||((Ai=k.requestAnimationFrame)||xl)(wl)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Rn&&(n.__=n.__V),n.i=void 0,n.__V=Rn})),zr=oe=null},k.__c=function(e,t){t.some(function(n){try{n.__h.forEach(In),n.__h=n.__h.filter(function(r){return!r.__||Fr(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],k.__e(r,n.__v)}}),Di&&Di(e,t)},k.unmount=function(e){Bi&&Bi(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{In(r)}catch(o){t=o}}),n.__H=void 0,t&&k.__e(t,n.__v))};var Mi=typeof requestAnimationFrame=="function";function xl(e){var t,n=function(){clearTimeout(r),Mi&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Mi&&(t=requestAnimationFrame(n))}function In(e){var t=oe,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),oe=t}function Fr(e){var t=oe;e.__c=e.__(),oe=t}function Lr(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Wi(e,t){return typeof t=="function"?t(e):t}function Hi(e,t){for(var n in t)e[n]=t[n];return e}function Mr(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Wr(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function Nn(e){this.props=e}function we(e,t){function n(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!a:Mr(this.props,o)}function r(o){return this.shouldComponentUpdate=n,$(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Nn.prototype=new Te).isPureReactComponent=!0,Nn.prototype.shouldComponentUpdate=function(e,t){return Mr(this.props,e)||Mr(this.state,t)};var ji=k.__b;k.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ji&&ji(e)};var Cl=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function O(e){function t(n){var r=Hi({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=Cl,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ui=function(e,t){return e==null?null:Qe(Qe(e).map(t))},$e={map:Ui,forEach:Ui,count:function(e){return e?Qe(e).length:0},only:function(e){var t=Qe(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Qe},Sl=k.__e;k.__e=function(e,t,n,r){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}Sl(e,t,n,r)};var Vi=k.unmount;function qi(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=Hi({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return qi(r,t,n)})),e}function Ki(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Ki(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function tn(){this.__u=0,this.t=null,this.__b=null}function Xi(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Gi(e){var t,n,r;function o(i){if(t||(t=e()).then(function(a){n=a.default||a},function(a){r=a}),r)throw r;if(!n)throw t;return $(n,i)}return o.displayName="Lazy",o.__f=!0,o}function Dt(){this.u=null,this.o=null}k.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Vi&&Vi(e)},(tn.prototype=new Te).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=Xi(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(s):s())};n.__R=a;var s=function(){if(!--r.__u){if(r.state.__a){var u=r.state.__a;r.__v.__k[0]=Ki(u,u.__c.__P,u.__c.__O)}var l;for(r.setState({__a:r.__b=null});l=r.t.pop();)l.forceUpdate()}},c=t.__h===!0;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},tn.prototype.componentWillUnmount=function(){this.t=[]},tn.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=qi(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&$(Y,null,e.fallback);return o&&(o.__h=null),[$(Y,null,t.__a?null:e.children),o]};var Ji=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(r)}}),en($(kl,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Hr(e,t){var n=$(El,{__v:e,i:t});return n.containerInfo=t,n}(Dt.prototype=new Te).__a=function(e){var t=this,n=Xi(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Ji(t,e,r)):o()};n?n(i):i()}},Dt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Qe(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Dt.prototype.componentDidUpdate=Dt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Ji(e,n,t)})};var Zi=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ol=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Pl=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Al=/[A-Z0-9]/g,Tl=typeof document<"u",Rl=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function jr(e,t,n){return t.__k==null&&(t.textContent=""),en(e,t),typeof n=="function"&&n(),e?e.__c:null}function Yi(e,t,n){return Pi(e,t),typeof n=="function"&&n(),e?e.__c:null}Te.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Te.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Qi=k.event;function Il(){}function Nl(){return this.cancelBubble}function Dl(){return this.defaultPrevented}k.event=function(e){return Qi&&(e=Qi(e)),e.persist=Il,e.isPropagationStopped=Nl,e.isDefaultPrevented=Dl,e.nativeEvent=e};var Ur,ea={configurable:!0,get:function(){return this.class}},ta=k.vnode;k.vnode=function(e){var t=e.type,n=e.props,r=n;if(typeof t=="string"){for(var o in r={},n){var i=n[o];if(!(o==="value"&&"defaultValue"in n&&i==null||Tl&&o==="children"&&t==="noscript")){var a=o.toLowerCase();o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&i===!0?i="":a==="ondoubleclick"?o="ondblclick":a!=="onchange"||t!=="input"&&t!=="textarea"||Rl(n.type)?a==="onfocus"?o="onfocusin":a==="onblur"?o="onfocusout":Pl.test(o)?o=a:t.indexOf("-")===-1&&Ol.test(o)?o=o.replace(Al,"-$&").toLowerCase():i===null&&(i=void 0):a=o="oninput",a==="oninput"&&r[o=a]&&(o="oninputCapture"),r[o]=i}}t=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=Qe(n.children).forEach(function(s){s.props.selected=r.value.indexOf(s.props.value)!=-1})),t=="select"&&r.defaultValue!=null&&(r.value=Qe(n.children).forEach(function(s){s.props.selected=r.multiple?r.defaultValue.indexOf(s.props.value)!=-1:r.defaultValue==s.props.value})),e.props=r,n.class!=n.className&&(ea.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",ea))}e.$$typeof=Zi,ta&&ta(e)};var na=k.__r;k.__r=function(e){na&&na(e),Ur=e.__c};var ra=k.diffed;k.diffed=function(e){ra&&ra(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),Ur=null};var oa={ReactCurrentDispatcher:{current:{readContext:function(e){return Ur.__n[e.__c].props.value}}}},Bl="17.0.2";function ia(e){return $.bind(null,e)}function Ne(e){return!!e&&e.$$typeof===Zi}function et(e){return Ne(e)?yl.apply(null,arguments):e}function Vr(e){return!!e.__k&&(en(null,e),!0)}function aa(e){return e&&(e.base||e.nodeType===1&&e)||null}var sa=function(e,t){return e(t)},nn=function(e,t){return e(t)},qr=Y;function Kr(e){e()}function ca(e){return e}function la(){return[!1,Kr]}var ua=Ie;function da(e,t){var n=t(),r=M({h:{__:n,v:t}}),o=r[0].h,i=r[1];return Ie(function(){o.__=n,o.v=t,Wr(o.__,t())||i({h:o})},[e,n,t]),P(function(){return Wr(o.__,o.v())||i({h:o}),e(function(){Wr(o.__,o.v())||i({h:o})})},[e]),n}var V={useState:M,useId:Li,useReducer:Re,useEffect:P,useLayoutEffect:Ie,useInsertionEffect:ua,useTransition:la,useDeferredValue:ca,useSyncExternalStore:da,startTransition:Kr,useRef:I,useImperativeHandle:zi,useMemo:te,useCallback:X,useContext:me,useDebugValue:Fi,version:"17.0.2",Children:$e,render:jr,hydrate:Yi,unmountComponentAtNode:Vr,createPortal:Hr,createElement:$,createContext:ue,createFactory:ia,cloneElement:et,createRef:bi,Fragment:Y,isValidElement:Ne,findDOMNode:aa,Component:Te,PureComponent:Nn,memo:we,forwardRef:O,flushSync:nn,unstable_batchedUpdates:sa,StrictMode:qr,Suspense:tn,SuspenseList:Dt,lazy:Gi,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:oa};const fa=Object.freeze(Object.defineProperty({__proto__:null,Children:$e,Component:Te,Fragment:Y,PureComponent:Nn,StrictMode:qr,Suspense:tn,SuspenseList:Dt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:oa,cloneElement:et,createContext:ue,createElement:$,createFactory:ia,createPortal:Hr,createRef:bi,default:V,findDOMNode:aa,flushSync:nn,forwardRef:O,hydrate:Yi,isValidElement:Ne,lazy:Gi,memo:we,render:jr,startTransition:Kr,unmountComponentAtNode:Vr,unstable_batchedUpdates:sa,useCallback:X,useContext:me,useDebugValue:Fi,useDeferredValue:ca,useEffect:P,useErrorBoundary:_l,useId:Li,useImperativeHandle:zi,useInsertionEffect:ua,useLayoutEffect:Ie,useMemo:te,useReducer:Re,useRef:I,useState:M,useSyncExternalStore:da,useTransition:la,version:Bl},Symbol.toStringTag,{value:"Module"}));var zl=0;function d(e,t,n,r,o,i){var a,s,c={};for(s in t)s=="ref"?a=t[s]:c[s]=t[s];var u={type:e,props:c,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--zl,__source:o,__self:i};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)c[s]===void 0&&(c[s]=a[s]);return k.vnode&&k.vnode(u),u}function Fl(e){return{render(t){jr(t,e)},unmount(){Vr(e)}}}function pa(e,t,n){let r="";n&&(r+=`[${n}]`),console[e](`[R2B]${r}: ${t}`)}function tt(e,t){pa("error",e,t)}function De(e,t){pa("warn",e,t)}const Xr="Zaply Shoppable Platform",Ll="production",Ml="https://zaply.io/pt/",Wl="recipe2basket",Gr="https://buscacepinter.correios.com.br/app/endereco/index.php",Hl="auto",jl="recipe2basket",ha="/",rn="/location",Dn="/retailer",Bn="/retailer/list",Jr="/retailer/error",st="/retailer/loading",Zr="/retailer/not-found",Bt="/settings",zn="/success",ct="*",Ul="r2b_debug",Vl="1",ql="512px",Kl="576px",Xl="28.761.289/0001-8",Fn="dpo@zaply.com.br",ma="sac@zaply.com.br",Ln="suporte@zaply.com.br",Gl="https://zaply.com.br";function Yr(e,t){return new URL(e,t)}function Mn(e,t){return Jl(e).get(t)}function Jl(e){return e.searchParams}function Zl(e,t,n){e.searchParams.set(t,n)}function Qr(e,t){for(const[n,r]of t)Zl(e,n,r)}function Yl(){return Mn(window.__RECIPE2BASKET__.url,Ul)===Vl}const Ql=Ll==="development";function de(e){(Yl()||Ql)&&e()}function ga(e,t){return function(){return e.apply(t,arguments)}}const{toString:ba}=Object.prototype,{getPrototypeOf:eo}=Object,to=(e=>t=>{const n=ba.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),nt=e=>(e=e.toLowerCase(),t=>to(t)===e),Wn=e=>t=>typeof t===e,{isArray:zt}=Array,on=Wn("undefined");function eu(e){return e!==null&&!on(e)&&e.constructor!==null&&!on(e.constructor)&<(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const va=nt("ArrayBuffer");function tu(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&va(e.buffer),t}const nu=Wn("string"),lt=Wn("function"),$a=Wn("number"),no=e=>e!==null&&typeof e=="object",ru=e=>e===!0||e===!1,Hn=e=>{if(to(e)!=="object")return!1;const t=eo(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ou=nt("Date"),iu=nt("File"),au=nt("Blob"),su=nt("FileList"),cu=e=>no(e)&<(e.pipe),lu=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||ba.call(e)===t||lt(e.toString)&&e.toString()===t)},uu=nt("URLSearchParams"),du=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function an(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),zt(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const _a=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),wa=e=>!on(e)&&e!==_a;function ro(){const{caseless:e}=wa(this)&&this||{},t={},n=(r,o)=>{const i=e&&ya(t,o)||o;Hn(t[i])&&Hn(r)?t[i]=ro(t[i],r):Hn(r)?t[i]=ro({},r):zt(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r(an(t,(o,i)=>{n&<(o)?e[i]=ga(o,n):e[i]=o},{allOwnKeys:r}),e),pu=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),hu=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},mu=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&eo(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},gu=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},bu=e=>{if(!e)return null;if(zt(e))return e;let t=e.length;if(!$a(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},vu=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&eo(Uint8Array)),$u=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},yu=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},_u=nt("HTMLFormElement"),wu=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),xa=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),xu=nt("RegExp"),Ca=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};an(n,(o,i)=>{t(o,i,e)!==!1&&(r[i]=o)}),Object.defineProperties(e,r)},Cu=e=>{Ca(e,(t,n)=>{if(lt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(lt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Su=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return zt(e)?r(e):r(String(e).split(t)),n},ku=()=>{},Eu=(e,t)=>(e=+e,Number.isFinite(e)?e:t),oo="abcdefghijklmnopqrstuvwxyz",Sa="0123456789",ka={DIGIT:Sa,ALPHA:oo,ALPHA_DIGIT:oo+oo.toUpperCase()+Sa},Ou=(e=16,t=ka.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Pu(e){return!!(e&<(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const _={isArray:zt,isArrayBuffer:va,isBuffer:eu,isFormData:lu,isArrayBufferView:tu,isString:nu,isNumber:$a,isBoolean:ru,isObject:no,isPlainObject:Hn,isUndefined:on,isDate:ou,isFile:iu,isBlob:au,isRegExp:xu,isFunction:lt,isStream:cu,isURLSearchParams:uu,isTypedArray:vu,isFileList:su,forEach:an,merge:ro,extend:fu,trim:du,stripBOM:pu,inherits:hu,toFlatObject:mu,kindOf:to,kindOfTest:nt,endsWith:gu,toArray:bu,forEachEntry:$u,matchAll:yu,isHTMLForm:_u,hasOwnProperty:xa,hasOwnProp:xa,reduceDescriptors:Ca,freezeMethods:Cu,toObjectSet:Su,toCamelCase:wu,noop:ku,toFiniteNumber:Eu,findKey:ya,global:_a,isContextDefined:wa,ALPHABET:ka,generateString:Ou,isSpecCompliantForm:Pu,toJSONObject:e=>{const t=new Array(10),n=(r,o)=>{if(no(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=zt(r)?[]:{};return an(r,(a,s)=>{const c=n(a,o+1);!on(c)&&(i[s]=c)}),t[o]=void 0,i}}return r};return n(e,0)}};function q(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}_.inherits(q,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ea=q.prototype,Oa={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Oa[e]={value:e}}),Object.defineProperties(q,Oa),Object.defineProperty(Ea,"isAxiosError",{value:!0}),q.from=(e,t,n,r,o,i)=>{const a=Object.create(Ea);return _.toFlatObject(e,a,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),q.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const Au=null;function io(e){return _.isPlainObject(e)||_.isArray(e)}function Pa(e){return _.endsWith(e,"[]")?e.slice(0,-2):e}function Aa(e,t,n){return e?e.concat(t).map(function(o,i){return o=Pa(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function Tu(e){return _.isArray(e)&&!e.some(io)}const Ru=_.toFlatObject(_,{},null,function(t){return/^is[A-Z]/.test(t)});function jn(e,t,n){if(!_.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=_.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,b){return!_.isUndefined(b[g])});const r=n.metaTokens,o=n.visitor||l,i=n.dots,a=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&_.isSpecCompliantForm(t);if(!_.isFunction(o))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(_.isDate(m))return m.toISOString();if(!c&&_.isBlob(m))throw new q("Blob is not supported. Use a Buffer instead.");return _.isArrayBuffer(m)||_.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function l(m,g,b){let v=m;if(m&&!b&&typeof m=="object"){if(_.endsWith(g,"{}"))g=r?g:g.slice(0,-2),m=JSON.stringify(m);else if(_.isArray(m)&&Tu(m)||(_.isFileList(m)||_.endsWith(g,"[]"))&&(v=_.toArray(m)))return g=Pa(g),v.forEach(function(w,C){!(_.isUndefined(w)||w===null)&&t.append(a===!0?Aa([g],C,i):a===null?g:g+"[]",u(w))}),!1}return io(m)?!0:(t.append(Aa(b,g,i),u(m)),!1)}const f=[],p=Object.assign(Ru,{defaultVisitor:l,convertValue:u,isVisitable:io});function h(m,g){if(!_.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+g.join("."));f.push(m),_.forEach(m,function(v,y){(!(_.isUndefined(v)||v===null)&&o.call(t,v,_.isString(y)?y.trim():y,g,p))===!0&&h(v,g?g.concat(y):[y])}),f.pop()}}if(!_.isObject(e))throw new TypeError("data must be an object");return h(e),t}function Ta(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ao(e,t){this._pairs=[],e&&jn(e,this,t)}const Ra=ao.prototype;Ra.append=function(t,n){this._pairs.push([t,n])},Ra.toString=function(t){const n=t?function(r){return t.call(this,r,Ta)}:Ta;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Iu(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ia(e,t,n){if(!t)return e;const r=n&&n.encode||Iu,o=n&&n.serialize;let i;if(o?i=o(t,n):i=_.isURLSearchParams(t)?t.toString():new ao(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Nu{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){_.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Na=Nu,Da={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Du=typeof URLSearchParams<"u"?URLSearchParams:ao,Bu=typeof FormData<"u"?FormData:null,zu=typeof Blob<"u"?Blob:null,Fu=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Lu=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Me={isBrowser:!0,classes:{URLSearchParams:Du,FormData:Bu,Blob:zu},isStandardBrowserEnv:Fu,isStandardBrowserWebWorkerEnv:Lu,protocols:["http","https","file","blob","url","data"]};function Mu(e,t){return jn(e,new Me.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return Me.isNode&&_.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Wu(e){return _.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Hu(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r=n.length;return a=!a&&_.isArray(o)?o.length:a,c?(_.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!_.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&_.isArray(o[a])&&(o[a]=Hu(o[a])),!s)}if(_.isFormData(e)&&_.isFunction(e.entries)){const n={};return _.forEachEntry(e,(r,o)=>{t(Wu(r),o,n,0)}),n}return null}const ju={"Content-Type":void 0};function Uu(e,t,n){if(_.isString(e))try{return(t||JSON.parse)(e),_.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Un={transitional:Da,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=_.isObject(t);if(i&&_.isHTMLForm(t)&&(t=new FormData(t)),_.isFormData(t))return o&&o?JSON.stringify(Ba(t)):t;if(_.isArrayBuffer(t)||_.isBuffer(t)||_.isStream(t)||_.isFile(t)||_.isBlob(t))return t;if(_.isArrayBufferView(t))return t.buffer;if(_.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Mu(t,this.formSerializer).toString();if((s=_.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return jn(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),Uu(t)):t}],transformResponse:[function(t){const n=this.transitional||Un.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(t&&_.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?q.from(s,q.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Me.classes.FormData,Blob:Me.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};_.forEach(["delete","get","head"],function(t){Un.headers[t]={}}),_.forEach(["post","put","patch"],function(t){Un.headers[t]=_.merge(ju)});const so=Un,Vu=_.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),qu=e=>{const t={};let n,r,o;return e&&e.split(` `).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&Vu[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},za=Symbol("internals");function sn(e){return e&&String(e).trim().toLowerCase()}function Vn(e){return e===!1||e==null?e:_.isArray(e)?e.map(Vn):String(e)}function Ku(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function Xu(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function co(e,t,n,r,o){if(_.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!_.isString(t)){if(_.isString(r))return t.indexOf(r)!==-1;if(_.isRegExp(r))return r.test(t)}}function Gu(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Ju(e,t){const n=_.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}class qn{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,c,u){const l=sn(c);if(!l)throw new Error("header name must be a non-empty string");const f=_.findKey(o,l);(!f||o[f]===void 0||u===!0||u===void 0&&o[f]!==!1)&&(o[f||c]=Vn(s))}const a=(s,c)=>_.forEach(s,(u,l)=>i(u,l,c));return _.isPlainObject(t)||t instanceof this.constructor?a(t,n):_.isString(t)&&(t=t.trim())&&!Xu(t)?a(qu(t),n):t!=null&&i(n,t,r),this}get(t,n){if(t=sn(t),t){const r=_.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Ku(o);if(_.isFunction(n))return n.call(this,o,r);if(_.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=sn(t),t){const r=_.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||co(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=sn(a),a){const s=_.findKey(r,a);s&&(!n||co(r,r[s],s,n))&&(delete r[s],o=!0)}}return _.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||co(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return _.forEach(this,(o,i)=>{const a=_.findKey(r,i);if(a){n[a]=Vn(o),delete n[i];return}const s=t?Gu(i):String(i).trim();s!==i&&delete n[i],n[s]=Vn(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return _.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&_.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[za]=this[za]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=sn(a);r[s]||(Ju(o,a),r[s]=!0)}return _.isArray(t)?t.forEach(i):i(t),this}}qn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_.freezeMethods(qn.prototype),_.freezeMethods(qn);const rt=qn;function lo(e,t){const n=this||so,r=t||n,o=rt.from(r.headers);let i=r.data;return _.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Fa(e){return!!(e&&e.__CANCEL__)}function cn(e,t,n){q.call(this,e??"canceled",q.ERR_CANCELED,t,n),this.name="CanceledError"}_.inherits(cn,q,{__CANCEL__:!0});function Zu(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new q("Request failed with status code "+n.status,[q.ERR_BAD_REQUEST,q.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Yu=Me.isStandardBrowserEnv?function(){return{write:function(n,r,o,i,a,s){const c=[];c.push(n+"="+encodeURIComponent(r)),_.isNumber(o)&&c.push("expires="+new Date(o).toGMTString()),_.isString(i)&&c.push("path="+i),_.isString(a)&&c.push("domain="+a),s===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Qu(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ed(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function La(e,t){return e&&!Qu(t)?ed(e,t):t}const td=Me.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let a=i;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){const s=_.isString(a)?o(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function nd(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function rd(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),l=r[i];a||(a=u),n[o]=c,r[o]=u;let f=i,p=0;for(;f!==o;)p+=n[f++],f=f%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-a{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-n,c=r(s),u=i<=a;n=i;const l={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&u?(a-i)/c:void 0,event:o};l[t?"download":"upload"]=!0,e(l)}}const Kn={http:Au,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let o=e.data;const i=rt.from(e.headers).normalize(),a=e.responseType;let s;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}_.isFormData(o)&&(Me.isStandardBrowserEnv||Me.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let u=new XMLHttpRequest;if(e.auth){const h=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(h+":"+m))}const l=La(e.baseURL,e.url);u.open(e.method.toUpperCase(),Ia(l,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function f(){if(!u)return;const h=rt.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),g={data:!a||a==="text"||a==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:h,config:e,request:u};Zu(function(v){n(v),c()},function(v){r(v),c()},g),u=null}if("onloadend"in u?u.onloadend=f:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(f)},u.onabort=function(){u&&(r(new q("Request aborted",q.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new q("Network Error",q.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let m=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const g=e.transitional||Da;e.timeoutErrorMessage&&(m=e.timeoutErrorMessage),r(new q(m,g.clarifyTimeoutError?q.ETIMEDOUT:q.ECONNABORTED,e,u)),u=null},Me.isStandardBrowserEnv){const h=(e.withCredentials||td(l))&&e.xsrfCookieName&&Yu.read(e.xsrfCookieName);h&&i.set(e.xsrfHeaderName,h)}o===void 0&&i.setContentType(null),"setRequestHeader"in u&&_.forEach(i.toJSON(),function(m,g){u.setRequestHeader(g,m)}),_.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),a&&a!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",Ma(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",Ma(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=h=>{u&&(r(!h||h.type?new cn(null,e,u):h),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const p=nd(l);if(p&&Me.protocols.indexOf(p)===-1){r(new q("Unsupported protocol "+p+":",q.ERR_BAD_REQUEST,e));return}u.send(o||null)})}};_.forEach(Kn,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const od={getAdapter:e=>{e=_.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;oe instanceof rt?e.toJSON():e;function Ft(e,t){t=t||{};const n={};function r(u,l,f){return _.isPlainObject(u)&&_.isPlainObject(l)?_.merge.call({caseless:f},u,l):_.isPlainObject(l)?_.merge({},l):_.isArray(l)?l.slice():l}function o(u,l,f){if(_.isUndefined(l)){if(!_.isUndefined(u))return r(void 0,u,f)}else return r(u,l,f)}function i(u,l){if(!_.isUndefined(l))return r(void 0,l)}function a(u,l){if(_.isUndefined(l)){if(!_.isUndefined(u))return r(void 0,u)}else return r(void 0,l)}function s(u,l,f){if(f in t)return r(u,l);if(f in e)return r(void 0,u)}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(u,l)=>o(Ha(u),Ha(l),!0)};return _.forEach(Object.keys(e).concat(Object.keys(t)),function(l){const f=c[l]||o,p=f(e[l],t[l],l);_.isUndefined(p)&&f!==s||(n[l]=p)}),n}const ja="1.3.4",fo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{fo[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ua={};fo.transitional=function(t,n,r){function o(i,a){return"[Axios v"+ja+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(t===!1)throw new q(o(a," has been removed"+(n?" in "+n:"")),q.ERR_DEPRECATED);return n&&!Ua[a]&&(Ua[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,s):!0}};function id(e,t,n){if(typeof e!="object")throw new q("options must be an object",q.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const s=e[i],c=s===void 0||a(s,i,e);if(c!==!0)throw new q("option "+i+" must be "+c,q.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new q("Unknown option "+i,q.ERR_BAD_OPTION)}}const po={assertOptions:id,validators:fo},ut=po.validators;class Xn{constructor(t){this.defaults=t,this.interceptors={request:new Na,response:new Na}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ft(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&po.assertOptions(r,{silentJSONParsing:ut.transitional(ut.boolean),forcedJSONParsing:ut.transitional(ut.boolean),clarifyTimeoutError:ut.transitional(ut.boolean)},!1),o!==void 0&&po.assertOptions(o,{encode:ut.function,serialize:ut.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a;a=i&&_.merge(i.common,i[n.method]),a&&_.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=rt.concat(a,i);const s=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(c=c&&g.synchronous,s.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let l,f=0,p;if(!c){const m=[Wa.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,u),p=m.length,l=Promise.resolve(n);f{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,s){r.reason||(r.reason=new cn(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new ho(function(o){t=o}),cancel:t}}}const ad=ho;function sd(e){return function(n){return e.apply(null,n)}}function cd(e){return _.isObject(e)&&e.isAxiosError===!0}const mo={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(mo).forEach(([e,t])=>{mo[t]=e});const ld=mo;function Va(e){const t=new Gn(e),n=ga(Gn.prototype.request,t);return _.extend(n,Gn.prototype,t,{allOwnKeys:!0}),_.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Va(Ft(e,o))},n}const he=Va(so);he.Axios=Gn,he.CanceledError=cn,he.CancelToken=ad,he.isCancel=Fa,he.VERSION=ja,he.toFormData=jn,he.AxiosError=q,he.Cancel=he.CanceledError,he.all=function(t){return Promise.all(t)},he.spread=sd,he.isAxiosError=cd,he.mergeConfig=Ft,he.AxiosHeaders=rt,he.formToJSON=e=>Ba(_.isHTMLForm(e)?new FormData(e):e),he.HttpStatusCode=ld,he.default=he;const qa=he,go="https://widget.zaply.com.br",ln=qa.create({baseURL:go});async function Lt(e){try{return{data:await e,error:null}}catch(t){return{data:null,error:t}}}async function ud(e){const{geolocation:t,partner:n,recipeUrl:r}=e,o=[...t?Object.entries(t):[],["partner",n],["recipe_url",r]],i=Yr("/check",go);Qr(i,o);const{data:a,error:s}=await Lt(ln.get(i.toString()));if(!a||s){de(()=>{tt(`Failed to check recipe: ${i}`)});return}return a.data}function dd(e){return e?e.raw?t=>t:e.deserializer:JSON.parse}function fd(e){return e?e.raw?String:e.serializer:JSON.stringify}function Ka(e,t,n){if(!e)throw new Error("storage: key cannot be falsy");const r=fd(n),o=dd(n);function i(l){try{const f=localStorage.getItem(l);return f!==null?o(f):(localStorage.setItem(l,r(t)),t)}catch(f){return f instanceof Error&&de(()=>{tt("There was an error in the initializer","storage")}),t}}let a=i(e);function s(){return a}function c(l){try{const f=typeof l=="function"?l(a):l;if(typeof f>"u")return;let p;n?n.raw?typeof f=="string"?p=f:p=JSON.stringify(f):n.serializer?p=n.serializer(f):p=JSON.stringify(f):p=JSON.stringify(f),localStorage.setItem(e,p),a=o(p)}catch(f){f instanceof Error&&de(()=>{tt(`Failed to set the item "${e}"`,"storage")})}}function u(){try{localStorage.removeItem(e),a=t}catch(l){l instanceof Error&&de(()=>{tt(`Failed to remove the item "${e}"`,"storage")})}}return{get:s,set:c,remove:u}}const pd="@r2b/consent",hd="@r2b/data",md={postalCode:!0,tracking:!0},gd={eventId:"",postalCode:""};function Mt(){return Ka(pd,md)}function Be(){return Ka(hd,gd)}const Xa=ue(null),Ga=ue(null);function We(){const e=me(Xa);if(!e)throw new Error("useWidgetApi: is undefined, seems you forgot to wrap the components in ``");return e}function vt(){const e=me(Ga);if(!e)throw new Error("useWidgetData: is undefined, seems you forgot to wrap the components in ``");return e}var un=(e=>(e.ON_CLOSE="ON_CLOSE",e.ON_OPEN="ON_OPEN",e))(un||{});const Ja={isOpen:!1};function bd(e=Ja,t){switch(t.type){case un.ON_CLOSE:return{...e,isOpen:!1};case un.ON_OPEN:return{...e,isOpen:!0};default:throw new Error(`Unhandled action type: ${t.type}`)}}let bo=null;function vd(e){const{children:t,onClose:n,value:r}=e,[o,i]=Re(bd,Ja,l=>({...l,isOpen:r.defaultIsOpen})),a=X(()=>{i({type:un.ON_CLOSE}),document.documentElement.classList.remove("r2b--open"),bo&&bo.focus(),n==null||n()},[n]),s=X(()=>{i({type:un.ON_OPEN}),document.documentElement.classList.add("r2b--open"),bo=document.activeElement},[]),c=te(()=>({onClose:a,onOpen:s}),[a,s]),u=te(()=>({...o,...r}),[o,r]);return d(Xa.Provider,{value:c,children:d(Ga.Provider,{value:u,children:t({isOpen:o.isOpen,onClose:a,onOpen:s})})})}function $d(e){var t;return Object.assign(window,{__RECIPE2BASKET__:{...window.__RECIPE2BASKET__??{},widget:{...((t=window.__RECIPE2BASKET__)==null?void 0:t.widget)??{},...e}}}),e}var ne="colors",_e="sizes",x="space",yd={gap:x,gridGap:x,columnGap:x,gridColumnGap:x,rowGap:x,gridRowGap:x,inset:x,insetBlock:x,insetBlockEnd:x,insetBlockStart:x,insetInline:x,insetInlineEnd:x,insetInlineStart:x,margin:x,marginTop:x,marginRight:x,marginBottom:x,marginLeft:x,marginBlock:x,marginBlockEnd:x,marginBlockStart:x,marginInline:x,marginInlineEnd:x,marginInlineStart:x,padding:x,paddingTop:x,paddingRight:x,paddingBottom:x,paddingLeft:x,paddingBlock:x,paddingBlockEnd:x,paddingBlockStart:x,paddingInline:x,paddingInlineEnd:x,paddingInlineStart:x,top:x,right:x,bottom:x,left:x,scrollMargin:x,scrollMarginTop:x,scrollMarginRight:x,scrollMarginBottom:x,scrollMarginLeft:x,scrollMarginX:x,scrollMarginY:x,scrollMarginBlock:x,scrollMarginBlockEnd:x,scrollMarginBlockStart:x,scrollMarginInline:x,scrollMarginInlineEnd:x,scrollMarginInlineStart:x,scrollPadding:x,scrollPaddingTop:x,scrollPaddingRight:x,scrollPaddingBottom:x,scrollPaddingLeft:x,scrollPaddingX:x,scrollPaddingY:x,scrollPaddingBlock:x,scrollPaddingBlockEnd:x,scrollPaddingBlockStart:x,scrollPaddingInline:x,scrollPaddingInlineEnd:x,scrollPaddingInlineStart:x,fontSize:"fontSizes",background:ne,backgroundColor:ne,backgroundImage:ne,borderImage:ne,border:ne,borderBlock:ne,borderBlockEnd:ne,borderBlockStart:ne,borderBottom:ne,borderBottomColor:ne,borderColor:ne,borderInline:ne,borderInlineEnd:ne,borderInlineStart:ne,borderLeft:ne,borderLeftColor:ne,borderRight:ne,borderRightColor:ne,borderTop:ne,borderTopColor:ne,caretColor:ne,color:ne,columnRuleColor:ne,fill:ne,outline:ne,outlineColor:ne,stroke:ne,textDecorationColor:ne,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:_e,minBlockSize:_e,maxBlockSize:_e,inlineSize:_e,minInlineSize:_e,maxInlineSize:_e,width:_e,minWidth:_e,maxWidth:_e,height:_e,minHeight:_e,maxHeight:_e,flexBasis:_e,gridTemplateColumns:_e,gridTemplateRows:_e,borderWidth:"borderWidths",borderTopWidth:"borderWidths",borderRightWidth:"borderWidths",borderBottomWidth:"borderWidths",borderLeftWidth:"borderWidths",borderStyle:"borderStyles",borderTopStyle:"borderStyles",borderRightStyle:"borderStyles",borderBottomStyle:"borderStyles",borderLeftStyle:"borderStyles",borderRadius:"radii",borderTopLeftRadius:"radii",borderTopRightRadius:"radii",borderBottomRightRadius:"radii",borderBottomLeftRadius:"radii",boxShadow:"shadows",textShadow:"shadows",transition:"transitions",zIndex:"zIndices"},_d=(e,t)=>typeof t=="function"?{"()":Function.prototype.toString.call(t)}:t,Wt=()=>{const e=Object.create(null);return(t,n,...r)=>{const o=(i=>JSON.stringify(i,_d))(t);return o in e?e[o]:e[o]=n(t,...r)}},$t=Symbol.for("sxs.internal"),vo=(e,t)=>Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)),Za=e=>{for(const t in e)return!0;return!1},{hasOwnProperty:wd}=Object.prototype,$o=e=>e.includes("-")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase()),xd=/\s+(?![^()]*\))/,Ht=e=>t=>e(...typeof t=="string"?String(t).split(xd):[t]),Ya={appearance:e=>({WebkitAppearance:e,appearance:e}),backfaceVisibility:e=>({WebkitBackfaceVisibility:e,backfaceVisibility:e}),backdropFilter:e=>({WebkitBackdropFilter:e,backdropFilter:e}),backgroundClip:e=>({WebkitBackgroundClip:e,backgroundClip:e}),boxDecorationBreak:e=>({WebkitBoxDecorationBreak:e,boxDecorationBreak:e}),clipPath:e=>({WebkitClipPath:e,clipPath:e}),content:e=>({content:e.includes('"')||e.includes("'")||/^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(e)?e:`"${e}"`}),hyphens:e=>({WebkitHyphens:e,hyphens:e}),maskImage:e=>({WebkitMaskImage:e,maskImage:e}),maskSize:e=>({WebkitMaskSize:e,maskSize:e}),tabSize:e=>({MozTabSize:e,tabSize:e}),textSizeAdjust:e=>({WebkitTextSizeAdjust:e,textSizeAdjust:e}),userSelect:e=>({WebkitUserSelect:e,userSelect:e}),marginBlock:Ht((e,t)=>({marginBlockStart:e,marginBlockEnd:t||e})),marginInline:Ht((e,t)=>({marginInlineStart:e,marginInlineEnd:t||e})),maxSize:Ht((e,t)=>({maxBlockSize:e,maxInlineSize:t||e})),minSize:Ht((e,t)=>({minBlockSize:e,minInlineSize:t||e})),paddingBlock:Ht((e,t)=>({paddingBlockStart:e,paddingBlockEnd:t||e})),paddingInline:Ht((e,t)=>({paddingInlineStart:e,paddingInlineEnd:t||e}))},yo=/([\d.]+)([^]*)/,Cd=(e,t)=>e.length?e.reduce((n,r)=>(n.push(...t.map(o=>o.includes("&")?o.replace(/&/g,/[ +>|~]/.test(r)&&/&.*&/.test(o)?`:is(${r})`:r):r+" "+o)),n),[]):t,Sd=(e,t)=>e in kd&&typeof t=="string"?t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,(n,r,o,i)=>r+(o==="stretch"?`-moz-available${i};${$o(e)}:${r}-webkit-fill-available`:`-moz-fit-content${i};${$o(e)}:${r}fit-content`)+i):String(t),kd={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},ot=e=>e?e+"-":"",Qa=(e,t,n)=>e.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,(r,o,i,a,s)=>a=="$"==!!i?r:(o||a=="--"?"calc(":"")+"var(--"+(a==="$"?ot(t)+(s.includes("$")?"":ot(n))+s.replace(/\$/g,"-"):s)+")"+(o||a=="--"?"*"+(o||"")+(i||"1")+")":"")),Ed=/\s*,\s*(?![^()]*\))/,Od=Object.prototype.toString,jt=(e,t,n,r,o)=>{let i,a,s;const c=(u,l,f)=>{let p,h;const m=g=>{for(p in g){const y=p.charCodeAt(0)===64,w=y&&Array.isArray(g[p])?g[p]:[g[p]];for(h of w){const C=/[A-Z]/.test(v=p)?v:v.replace(/-[^]/g,B=>B[1].toUpperCase()),T=typeof h=="object"&&h&&h.toString===Od&&(!r.utils[C]||!l.length);if(C in r.utils&&!T){const B=r.utils[C];if(B!==a){a=B,m(B(h)),a=null;continue}}else if(C in Ya){const B=Ya[C];if(B!==s){s=B,m(B(h)),s=null;continue}}if(y&&(b=p.slice(1)in r.media?"@media "+r.media[p.slice(1)]:p,p=b.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,(B,A,E,K,J,ie)=>{const fe=yo.test(A),ge=.0625*(fe?-1:1),[pe,Z]=fe?[K,A]:[A,K];return"("+(E[0]==="="?"":E[0]===">"===fe?"max-":"min-")+pe+":"+(E[0]!=="="&&E.length===1?Z.replace(yo,(Je,ke,It)=>Number(ke)+ge*(E===">"?1:-1)+It):Z)+(J?") and ("+(J[0]===">"?"min-":"max-")+pe+":"+(J.length===1?ie.replace(yo,(Je,ke,It)=>Number(ke)+ge*(J===">"?-1:1)+It):ie):"")+")"})),T){const B=y?f.concat(p):[...f],A=y?[...l]:Cd(l,p.split(Ed));i!==void 0&&o(es(...i)),i=void 0,c(h,A,B)}else i===void 0&&(i=[[],l,f]),p=y||p.charCodeAt(0)!==36?p:`--${ot(r.prefix)}${p.slice(1).replace(/\$/g,"-")}`,h=T?h:typeof h=="number"?h&&C in Pd?String(h)+"px":String(h):Qa(Sd(C,h??""),r.prefix,r.themeMap[C]),i[0].push(`${y?`${p} `:`${$o(p)}:`}${h}`)}}var b,v};m(u),i!==void 0&&o(es(...i)),i=void 0};c(e,t,n)},es=(e,t,n)=>`${n.map(r=>`${r}{`).join("")}${t.length?`${t.join(",")}{`:""}${e.join(";")}${t.length?"}":""}${Array(n.length?n.length+1:0).join("}")}`,Pd={animationDelay:1,animationDuration:1,backgroundSize:1,blockSize:1,border:1,borderBlock:1,borderBlockEnd:1,borderBlockEndWidth:1,borderBlockStart:1,borderBlockStartWidth:1,borderBlockWidth:1,borderBottom:1,borderBottomLeftRadius:1,borderBottomRightRadius:1,borderBottomWidth:1,borderEndEndRadius:1,borderEndStartRadius:1,borderInlineEnd:1,borderInlineEndWidth:1,borderInlineStart:1,borderInlineStartWidth:1,borderInlineWidth:1,borderLeft:1,borderLeftWidth:1,borderRadius:1,borderRight:1,borderRightWidth:1,borderSpacing:1,borderStartEndRadius:1,borderStartStartRadius:1,borderTop:1,borderTopLeftRadius:1,borderTopRightRadius:1,borderTopWidth:1,borderWidth:1,bottom:1,columnGap:1,columnRule:1,columnRuleWidth:1,columnWidth:1,containIntrinsicSize:1,flexBasis:1,fontSize:1,gap:1,gridAutoColumns:1,gridAutoRows:1,gridTemplateColumns:1,gridTemplateRows:1,height:1,inlineSize:1,inset:1,insetBlock:1,insetBlockEnd:1,insetBlockStart:1,insetInline:1,insetInlineEnd:1,insetInlineStart:1,left:1,letterSpacing:1,margin:1,marginBlock:1,marginBlockEnd:1,marginBlockStart:1,marginBottom:1,marginInline:1,marginInlineEnd:1,marginInlineStart:1,marginLeft:1,marginRight:1,marginTop:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,offsetDistance:1,offsetRotate:1,outline:1,outlineOffset:1,outlineWidth:1,overflowClipMargin:1,padding:1,paddingBlock:1,paddingBlockEnd:1,paddingBlockStart:1,paddingBottom:1,paddingInline:1,paddingInlineEnd:1,paddingInlineStart:1,paddingLeft:1,paddingRight:1,paddingTop:1,perspective:1,right:1,rowGap:1,scrollMargin:1,scrollMarginBlock:1,scrollMarginBlockEnd:1,scrollMarginBlockStart:1,scrollMarginBottom:1,scrollMarginInline:1,scrollMarginInlineEnd:1,scrollMarginInlineStart:1,scrollMarginLeft:1,scrollMarginRight:1,scrollMarginTop:1,scrollPadding:1,scrollPaddingBlock:1,scrollPaddingBlockEnd:1,scrollPaddingBlockStart:1,scrollPaddingBottom:1,scrollPaddingInline:1,scrollPaddingInlineEnd:1,scrollPaddingInlineStart:1,scrollPaddingLeft:1,scrollPaddingRight:1,scrollPaddingTop:1,shapeMargin:1,textDecoration:1,textDecorationThickness:1,textIndent:1,textUnderlineOffset:1,top:1,transitionDelay:1,transitionDuration:1,verticalAlign:1,width:1,wordSpacing:1},ts=e=>String.fromCharCode(e+(e>25?39:97)),yt=e=>(t=>{let n,r="";for(n=Math.abs(t);n>52;n=n/52|0)r=ts(n%52)+r;return ts(n%52)+r})(((t,n)=>{let r=n.length;for(;r;)t=33*t^n.charCodeAt(--r);return t})(5381,JSON.stringify(e))>>>0),dn=["themed","global","styled","onevar","resonevar","allvar","inline"],Ad=e=>{if(e.href&&!e.href.startsWith(location.origin))return!1;try{return!!e.cssRules}catch{return!1}},Td=e=>{let t;const n=()=>{const{cssRules:o}=t.sheet;return[].map.call(o,(i,a)=>{const{cssText:s}=i;let c="";if(s.startsWith("--sxs"))return"";if(o[a-1]&&(c=o[a-1].cssText).startsWith("--sxs")){if(!i.cssRules.length)return"";for(const u in t.rules)if(t.rules[u].group===i)return`--sxs{--sxs:${[...t.rules[u].cache].join(" ")}}${s}`;return i.cssRules.length?`${c}${s}`:""}return s}).join("")},r=()=>{if(t){const{rules:s,sheet:c}=t;if(!c.deleteRule){for(;Object(Object(c.cssRules)[0]).type===3;)c.cssRules.splice(0,1);c.cssRules=[]}for(const u in s)delete s[u]}const o=Object(e).styleSheets||[];for(const s of o)if(Ad(s)){for(let c=0,u=s.cssRules;u[c];++c){const l=Object(u[c]);if(l.type!==1)continue;const f=Object(u[c+1]);if(f.type!==4)continue;++c;const{cssText:p}=l;if(!p.startsWith("--sxs"))continue;const h=p.slice(14,-3).trim().split(/\s+/),m=dn[h[0]];m&&(t||(t={sheet:s,reset:r,rules:{},toString:n}),t.rules[m]={group:f,index:c,cache:new Set(h)})}if(t)break}if(!t){const s=(c,u)=>({type:u,cssRules:[],insertRule(l,f){this.cssRules.splice(f,0,s(l,{import:3,undefined:1}[(l.toLowerCase().match(/^@([a-z]+)/)||[])[1]]||4))},get cssText(){return c==="@media{}"?`@media{${[].map.call(this.cssRules,l=>l.cssText).join("")}}`:c}});t={sheet:e?(e.head||e).appendChild(document.createElement("style")).sheet:s("","text/css"),rules:{},reset:r,toString:n}}const{sheet:i,rules:a}=t;for(let s=dn.length-1;s>=0;--s){const c=dn[s];if(!a[c]){const u=dn[s+1],l=a[u]?a[u].index:i.cssRules.length;i.insertRule("@media{}",l),i.insertRule(`--sxs{--sxs:${s}}`,l),a[c]={group:i.cssRules[l+1],index:l,cache:new Set([s])}}Rd(a[c])}};return r(),t},Rd=e=>{const t=e.group;let n=t.cssRules.length;e.apply=r=>{try{t.insertRule(r,n),++n}catch{}}},fn=Symbol(),Id=Wt(),ns=(e,t)=>Id(e,()=>(...n)=>{let r={type:null,composers:new Set};for(const o of n)if(o!=null)if(o[$t]){r.type==null&&(r.type=o[$t].type);for(const i of o[$t].composers)r.composers.add(i)}else o.constructor!==Object||o.$$typeof?r.type==null&&(r.type=o):r.composers.add(Nd(o,e));return r.type==null&&(r.type="span"),r.composers.size||r.composers.add(["PJLV",{},[],[],{},[]]),Dd(e,r,t)}),Nd=({variants:e,compoundVariants:t,defaultVariants:n,...r},o)=>{const i=`${ot(o.prefix)}c-${yt(r)}`,a=[],s=[],c=Object.create(null),u=[];for(const p in n)c[p]=String(n[p]);if(typeof e=="object"&&e)for(const p in e){l=c,f=p,wd.call(l,f)||(c[p]="undefined");const h=e[p];for(const m in h){const g={[p]:String(m)};String(m)==="undefined"&&u.push(p);const b=h[m],v=[g,b,!Za(b)];a.push(v)}}var l,f;if(typeof t=="object"&&t)for(const p of t){let{css:h,...m}=p;h=typeof h=="object"&&h||{};for(const b in m)m[b]=String(m[b]);const g=[m,h,!Za(h)];s.push(g)}return[i,r,a,s,c,u]},Dd=(e,t,n)=>{const[r,o,i,a]=Bd(t.composers),s=typeof t.type=="function"||t.type.$$typeof?(f=>{function p(){for(let h=0;hp.rules[h]={apply:m=>p[fn].push([h,m])}),p})(n):null,c=(s||n).rules,u=`.${r}${o.length>1?`:where(.${o.slice(1).join(".")})`:""}`,l=f=>{f=typeof f=="object"&&f||zd;const{css:p,...h}=f,m={};for(const v in i)if(delete h[v],v in f){let y=f[v];typeof y=="object"&&y?m[v]={"@initial":i[v],...y}:(y=String(y),m[v]=y!=="undefined"||a.has(v)?y:i[v])}else m[v]=i[v];const g=new Set([...o]);for(const[v,y,w,C]of t.composers){n.rules.styled.cache.has(v)||(n.rules.styled.cache.add(v),jt(y,[`.${v}`],[],e,A=>{c.styled.apply(A)}));const T=rs(w,m,e.media),B=rs(C,m,e.media,!0);for(const A of T)if(A!==void 0)for(const[E,K,J]of A){const ie=`${v}-${yt(K)}-${E}`;g.add(ie);const fe=(J?n.rules.resonevar:n.rules.onevar).cache,ge=J?c.resonevar:c.onevar;fe.has(ie)||(fe.add(ie),jt(K,[`.${ie}`],[],e,pe=>{ge.apply(pe)}))}for(const A of B)if(A!==void 0)for(const[E,K]of A){const J=`${v}-${yt(K)}-${E}`;g.add(J),n.rules.allvar.cache.has(J)||(n.rules.allvar.cache.add(J),jt(K,[`.${J}`],[],e,ie=>{c.allvar.apply(ie)}))}}if(typeof p=="object"&&p){const v=`${r}-i${yt(p)}-css`;g.add(v),n.rules.inline.cache.has(v)||(n.rules.inline.cache.add(v),jt(p,[`.${v}`],[],e,y=>{c.inline.apply(y)}))}for(const v of String(f.className||"").trim().split(/\s+/))v&&g.add(v);const b=h.className=[...g].join(" ");return{type:t.type,className:b,selector:u,props:h,toString:()=>b,deferredInjector:s}};return vo(l,{className:r,selector:u,[$t]:t,toString:()=>(n.rules.styled.cache.has(r)||l(),r)})},Bd=e=>{let t="";const n=[],r={},o=[];for(const[i,,,,a,s]of e){t===""&&(t=i),n.push(i),o.push(...s);for(const c in a){const u=a[c];(r[c]===void 0||u!=="undefined"||s.includes(u))&&(r[c]=u)}}return[t,n,r,new Set(o)]},rs=(e,t,n,r)=>{const o=[];e:for(let[i,a,s]of e){if(s)continue;let c,u=0,l=!1;for(c in i){const f=i[c];let p=t[c];if(p!==f){if(typeof p!="object"||!p)continue e;{let h,m,g=0;for(const b in p){if(f===String(p[b])){if(b!=="@initial"){const v=b.slice(1);(m=m||[]).push(v in n?n[v]:b.replace(/^@media ?/,"")),l=!0}u+=g,h=!0}++g}if(m&&m.length&&(a={["@media "+m.join(", ")]:a}),!h)continue e}}}(o[u]=o[u]||[]).push([r?"cv":`${c}-${i[c]}`,a,l])}return o},zd={},Fd=Wt(),Ld=(e,t)=>Fd(e,()=>(...n)=>{const r=()=>{for(let o of n){o=typeof o=="object"&&o||{};let i=yt(o);if(!t.rules.global.cache.has(i)){if(t.rules.global.cache.add(i),"@import"in o){let a=[].indexOf.call(t.sheet.cssRules,t.rules.themed.group)-1;for(let s of[].concat(o["@import"]))s=s.includes('"')||s.includes("'")?s:`"${s}"`,t.sheet.insertRule(`@import ${s};`,a++);delete o["@import"]}jt(o,[],[],e,a=>{t.rules.global.apply(a)})}}return""};return vo(r,{toString:r})}),Md=Wt(),Wd=(e,t)=>Md(e,()=>n=>{const r=`${ot(e.prefix)}k-${yt(n)}`,o=()=>{if(!t.rules.global.cache.has(r)){t.rules.global.cache.add(r);const i=[];jt(n,[],[],e,s=>i.push(s));const a=`@keyframes ${r}{${i.join("")}}`;t.rules.global.apply(a)}return r};return vo(o,{get name(){return o()},toString:o})}),Hd=class{constructor(e,t,n,r){this.token=e==null?"":String(e),this.value=t==null?"":String(t),this.scale=n==null?"":String(n),this.prefix=r==null?"":String(r)}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+ot(this.prefix)+ot(this.scale)+this.token}toString(){return this.computedValue}},jd=Wt(),Ud=(e,t)=>jd(e,()=>(n,r)=>{r=typeof n=="object"&&n||Object(r);const o=`.${n=(n=typeof n=="string"?n:"")||`${ot(e.prefix)}t-${yt(r)}`}`,i={},a=[];for(const c in r){i[c]={};for(const u in r[c]){const l=`--${ot(e.prefix)}${c}-${u}`,f=Qa(String(r[c][u]),e.prefix,c);i[c][u]=new Hd(u,f,c,e.prefix),a.push(`${l}:${f}`)}}const s=()=>{if(a.length&&!t.rules.themed.cache.has(n)){t.rules.themed.cache.add(n);const c=`${r===e.theme?":root,":""}.${n}{${a.join(";")}}`;t.rules.themed.apply(c)}return n};return{...i,get className(){return s()},selector:o,toString:s}}),Vd=Wt(),qd=Wt(),Kd=e=>{const t=(n=>{let r=!1;const o=Vd(n,i=>{r=!0;const a="prefix"in(i=typeof i=="object"&&i||{})?String(i.prefix):"",s=typeof i.media=="object"&&i.media||{},c=typeof i.root=="object"?i.root||null:globalThis.document||null,u=typeof i.theme=="object"&&i.theme||{},l={prefix:a,media:s,theme:u,themeMap:typeof i.themeMap=="object"&&i.themeMap||{...yd},utils:typeof i.utils=="object"&&i.utils||{}},f=Td(c),p={css:ns(l,f),globalCss:Ld(l,f),keyframes:Wd(l,f),createTheme:Ud(l,f),reset(){f.reset(),p.theme.toString()},theme:{},sheet:f,config:l,prefix:a,getCssText:f.toString,toString:f.toString};return String(p.theme=p.createTheme(u)),p});return r||o.reset(),o})(e);return t.styled=(({config:n,sheet:r})=>qd(n,()=>{const o=ns(n,r);return(...i)=>{const a=o(...i),s=a[$t].type,c=V.forwardRef((u,l)=>{const f=u&&u.as||s,{props:p,deferredInjector:h}=a(u);return delete p.as,p.ref=l,h?V.createElement(V.Fragment,null,V.createElement(f,p),V.createElement(h,null)):V.createElement(f,p)});return c.className=a.className,c.displayName=`Styled.${s.displayName||s.name||s}`,c.selector=a.selector,c.toString=()=>a.selector,c[$t]=a[$t],c}}))(t),t};const{config:Vb,prefix:qb,theme:Kb,css:_t,reset:Xb,styled:z,globalCss:_o,keyframes:Ut,getCssText:Gb,createTheme:Jb}=Kd({prefix:"r2b",media:{sm:"(width >= 480px)",md:"(width >= 768px)",lg:"(width >= 992px)",hover:"(any-hover: hover)",motion:"(prefers-reduced-motion: no-preference)"},theme:{borderStyles:{solid:"solid"},borderWidths:{xs:"1px solid",sm:"2px solid",md:"4px solid",lg:"8px solid"},colors:{gray50:"#FFFFFF",gray75:"#FDFDFD",gray100:"#F8F8F8",gray200:"#E6E6E6",gray300:"#D5D5D5",gray400:"#B1B1B1",gray500:"#909090",gray600:"#6D6D6D",gray700:"#464646",gray800:"#222222",gray900:"#000000",blue100:"#E0F2FF",blue200:"#CAE8FF",blue300:"#B5DEFF",blue400:"#96CEFD",blue500:"#78BBFA",blue600:"#59A7F6",blue700:"#3892F3",blue800:"#147AF3",blue900:"#0265DC",blue1000:"#0054B6",blue1100:"#004491",blue1200:"#003571",blue1300:"#002754",green100:"#CEF8E0",green200:"#ADF4CE",green300:"#89ECBC",green400:"#67DEA8",green500:"#49CC93",green600:"#2FB880",green700:"#15A46E",green800:"#008D5D",green900:"#007A4D",green1000:"#00653E",green1100:"#005132",green1200:"#053F27",green1300:"#0A2E1D",orange100:"#FFECCC",orange200:"#FFDFAD",orange300:"#FDD291",orange400:"#FFBB63",orange500:"#FFA037",orange600:"#F68611",orange700:"#E46F00",orange800:"#CB5D00",orange900:"#B14C00",orange1000:"#953D00",orange1100:"#7A2F00",orange1200:"#612300",orange1300:"#491901",red100:"#FFEBE7",red200:"#FFDDD6",red300:"#FFCDC3",red400:"#FFB7A9",red500:"#FF9B88",red600:"#FF7C65",red700:"#F75C46",red800:"#EA3829",red900:"#D31510",red1000:"#B40000",red1100:"#930000",red1200:"#740000",red1300:"#590000",purple100:"#F6EBFF",purple200:"#EEDDFD",purple300:"#E6D0FF",purple400:"#DBBBFE",purple500:"#CCA4FD",purple600:"#BD8BFC",purple700:"#AE72F9",purple800:"#9D57F4",purple900:"#893DE7",purple1000:"#7326D3",purple1100:"#5D13B7",purple1200:"#470C94",purple1300:"#33106A",yellow100:"#FBF199",yellow200:"#F8E750",yellow300:"#F8D904",yellow400:"#E8C600",yellow500:"#D7B300",yellow600:"#C49F00",yellow700:"#B08C00",yellow800:"#9B7800",yellow900:"#856600",yellow1000:"#705300",yellow1100:"#5B4300",yellow1200:"#483300",yellow1300:"#362500",black:"#000000",white:"#FFFFFF",transparent:"rgba(0, 0, 0, 0)",blackAlpha50:"rgba(0, 0, 0, 0.04)",blackAlpha100:"rgba(0, 0, 0, 0.06)",blackAlpha200:"rgba(0, 0, 0, 0.08)",blackAlpha300:"rgba(0, 0, 0, 0.16)",blackAlpha400:"rgba(0, 0, 0, 0.24)",blackAlpha500:"rgba(0, 0, 0, 0.36)",blackAlpha600:"rgba(0, 0, 0, 0.48)",blackAlpha700:"rgba(0, 0, 0, 0.64)",blackAlpha800:"rgba(0, 0, 0, 0.80)",blackAlpha900:"rgba(0, 0, 0, 0.92)",whiteAlpha50:"rgba(255, 255, 255, 0.04)",whiteAlpha100:"rgba(255, 255, 255, 0.06)",whiteAlpha200:"rgba(255, 255, 255, 0.08)",whiteAlpha300:"rgba(255, 255, 255, 0.16)",whiteAlpha400:"rgba(255, 255, 255, 0.24)",whiteAlpha500:"rgba(255, 255, 255, 0.36)",whiteAlpha600:"rgba(255, 255, 255, 0.48)",whiteAlpha700:"rgba(255, 255, 255, 0.64)",whiteAlpha800:"rgba(255, 255, 255, 0.80)",whiteAlpha900:"rgba(255, 255, 255, 0.92)",primary50:"#FFF1EB",primary100:"#FFD4C2",primary200:"#FFAF85",primary300:"#FF955C",primary400:"#FF7A33",primary500:"#FF5C01",primary600:"#E04F00",primary700:"#B84000",primary800:"#8F3200",primary900:"#662400"},fonts:{body:"Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif",heading:"$body"},fontSizes:{xs:"12px",sm:"14px",md:"16px",lg:"18px",xl:"20px","2xl":"24px","3xl":"30px","4xl":"36px","5xl":"48px"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:"12px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px"},radii:{xs:"4px",sm:"6px",md:"8px",lg:"12px",pill:"9999px",round:"50%"},shadows:{outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",xs:"0 0 0 1px rgba(0, 0, 0, 0.05)","-xs":"0 0 0 -1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)","-sm":"0 -1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)","-base":"0 -1px 3px 0 rgba(0, 0, 0, 0.1), 0 -1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)","-md":"0 -4px 6px -1px rgba(0, 0, 0, 0.1), 0 -2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)","-lg":"0 -10px 15px -3px rgba(0, 0, 0, 0.1), 0 -4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","-xl":"0 -20px 25px -5px rgba(0, 0, 0, 0.1), 0 -10px 10px -5px rgba(0, 0, 0, 0.04)",inner:"inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)","-inner":"inset 0 -2px 4px 0 rgba(0, 0, 0, 0.06)"},sizes:{min:"min-content",max:"max-content",full:"100%"},space:{px:"1px",1:"4px",2:"8px",3:"12px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",12:"48px",14:"56px",16:"64px"},transitions:{ultraFast:"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms",ultraSlow:"500ms"},zIndices:{hide:-1,dropdown:1e3,sticky:1100,overlay:1300,modal:1400,popover:1500,toast:1700,tooltip:1800,max:2147483647}},utils:{pos:e=>({position:e}),t:e=>({top:e}),r:e=>({right:e}),b:e=>({bottom:e}),l:e=>({left:e}),z:e=>({zIndex:e}),d:e=>({display:e}),v:e=>({visibility:e}),ov:e=>({overflow:e}),ovx:e=>({overflowX:e}),ovy:e=>({overflowY:e}),cp:e=>({clip:e}),rsz:e=>({resize:e}),cur:e=>({cursor:e}),m:e=>({margin:e}),mt:e=>({marginTop:e}),mr:e=>({marginRight:e}),mb:e=>({marginBottom:e}),ml:e=>({marginLeft:e}),mx:e=>({marginLeft:e,marginRight:e}),marginX:e=>({marginLeft:e,marginRight:e}),my:e=>({marginTop:e,marginBottom:e}),marginY:e=>({marginTop:e,marginBottom:e}),mbl:e=>({marginBlock:e}),mble:e=>({marginBlockEnd:e}),mbls:e=>({marginBlockStart:e}),mi:e=>({marginInline:e}),mie:e=>({marginInlineEnd:e}),mis:e=>({marginInlineStart:e}),p:e=>({padding:e}),pt:e=>({paddingTop:e}),pr:e=>({paddingRight:e}),pb:e=>({paddingBottom:e}),pl:e=>({paddingLeft:e}),px:e=>({paddingLeft:e,paddingRight:e}),paddingX:e=>({paddingLeft:e,paddingRight:e}),py:e=>({paddingTop:e,paddingBottom:e}),paddingY:e=>({paddingTop:e,paddingBottom:e}),pbl:e=>({paddingBlock:e}),pble:e=>({paddingBlockEnd:e}),pbls:e=>({paddingBlockStart:e}),pi:e=>({paddingInline:e}),pie:e=>({paddingInlineEnd:e}),pis:e=>({paddingInlineStart:e}),bxz:e=>({boxSizing:e}),bxsh:e=>({boxShadow:e}),w:e=>({width:e}),h:e=>({height:e}),size:e=>({width:e,height:e}),maw:e=>({maxWidth:e}),mah:e=>({maxHeight:e}),miw:e=>({minWidth:e}),mih:e=>({minHeight:e}),f:e=>({font:e}),fw:e=>({fontWeight:e}),fs:e=>({fontStyle:e}),fv:e=>({fontVariant:e}),fz:e=>({fontSize:e}),ff:e=>({fontFamily:e}),fsm:e=>({fontSmooth:e}),fst:e=>({fontStretch:e}),va:e=>({verticalAlign:e}),ta:e=>({textAlign:e}),td:e=>({textDecoration:e}),te:e=>({textEmphasis:e}),ti:e=>({textIndent:e}),to:e=>({textOrientation:e}),tj:e=>({textJustify:e}),tt:e=>({textTransform:e}),lh:e=>({lineHeight:e}),lts:e=>({letterSpacing:e}),whs:e=>({whiteSpace:e}),wob:e=>({wordBreak:e}),wos:e=>({wordSpacing:e}),wow:e=>({wordWrap:e}),bg:e=>({background:e}),bgc:e=>({backgroundColor:e}),bgi:e=>({backgroundImage:e}),bgr:e=>({backgroundRepeat:e}),bga:e=>({backgroundAttachment:e}),bgp:e=>({backgroundPosition:e}),bgpx:e=>({backgroundPositionX:e}),bgpy:e=>({backgroundPositionY:e}),bgcp:e=>({"-webkit-background-clip":e,backgroundClip:e}),bgo:e=>({backgroundOrigin:e}),bgsz:e=>({backgroundSize:e}),c:e=>({color:e}),op:e=>({opacity:e}),ct:e=>({content:e}),cnt:e=>({content:e}),q:e=>({quotes:e}),coi:e=>({counterIncrement:e}),cor:e=>({counterReset:e}),ol:e=>({outline:e}),olo:e=>({outlineOffset:e}),olw:e=>({outlineWidth:e}),ols:e=>({outlineStyle:e}),olc:e=>({outlineColor:e}),bd:e=>({border:e}),bdcl:e=>({borderCollapse:e}),bdc:e=>({borderColor:e}),bdi:e=>({borderImage:e}),bdsp:e=>({borderSpacing:e}),bds:e=>({borderStyle:e}),bdw:e=>({borderWidth:e}),bt:e=>({borderTop:e}),bdt:e=>({borderTop:e}),bdtw:e=>({borderTopWidth:e}),bdts:e=>({borderTopStyle:e}),bdtc:e=>({borderTopColor:e}),br:e=>({borderRight:e}),bdr:e=>({borderRight:e}),bdrw:e=>({borderRightWidth:e}),bdrst:e=>({borderRightStyle:e}),bdrc:e=>({borderRightColor:e}),bb:e=>({borderBottom:e}),bdb:e=>({borderBottom:e}),bdbw:e=>({borderBottomWidth:e}),bdbs:e=>({borderBottomStyle:e}),bdbc:e=>({borderBottomColor:e}),bl:e=>({borderLeft:e}),bdl:e=>({borderLeft:e}),bdlw:e=>({borderLeftWidth:e}),bdls:e=>({borderLeftStyle:e}),bdlc:e=>({borderLeftColor:e}),bdrs:e=>({borderRadius:e}),bdtrrs:e=>({borderTopRightRadius:e}),bdtlrs:e=>({borderTopLeftRadius:e}),bdbrrs:e=>({borderBottomRightRadius:e}),bdblrs:e=>({borderBottomLeftRadius:e}),lis:e=>({listStyle:e}),lisp:e=>({listStylePosition:e}),list:e=>({listStyleType:e}),lisi:e=>({listStyleImage:e}),ac:e=>({alignContent:e}),ai:e=>({alignItems:e}),anim:e=>({animation:e}),animdel:e=>({animationDelay:e}),animdir:e=>({animationDirection:e}),animdur:e=>({animationDuration:e}),animfm:e=>({animationFillMode:e}),animic:e=>({animationIterationCount:e}),animn:e=>({animationName:e}),animps:e=>({animationPlayState:e}),animtf:e=>({animationTimingFunction:e}),app:e=>({"-webkit-appearance":e,appearance:e}),as:e=>({alignSelf:e}),bfv:e=>({backfaceVisibility:e}),fx:e=>({flex:e}),fxb:e=>({flexBasis:e}),fxd:e=>({flexDirection:e}),fxf:e=>({flexFlow:e}),fxg:e=>({flexGrow:e}),fxsh:e=>({flexShrink:e}),fxw:e=>({flexWrap:e}),jc:e=>({justifyContent:e}),ord:e=>({order:e}),tov:e=>({textOverflow:e}),trf:e=>({transform:e}),trfo:e=>({transformOrigin:e}),trfs:e=>({transformStyle:e}),trs:e=>({transition:e}),trsde:e=>({transitionDelay:e}),trsdu:e=>({transitionDuration:e}),trsp:e=>({transitionProperty:e}),trstf:e=>({transitionTimingFunction:e}),us:e=>({"-webkit-user-select":e,userSelect:e}),wfsm:e=>({"-webkit-font-smoothing":e}),wm:e=>({writingMode:e}),pe:e=>({pointerEvents:e})}}),Ce=e=>e,Xd=_o({".r2b-recipe-button, .r2b-recipe-button:focus":{outlineColor:"transparent !important"},".r2b-recipe-button:focus-visible":{outlineColor:"#000 !important",outlineOffset:"1px !important",outlineStyle:"solid !important",outlineWidth:"2px !important"}}),Gd=_o({"@import":['url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap")']}),os=ue(null);function ze(){const e=me(os);if(!e)throw new Error("useRouter: is undefined, seems you forgot to wrap the components in ``");return e}const is=ue(null);function wo(){const e=me(is);if(!e)throw new Error("useRoutes: is undefined, seems you forgot to wrap the components in ``");return e}function F(){return F=Object.assign?Object.assign.bind():function(e){for(var t=1;te.forEach(n=>Jd(n,t))}function pn(...e){return X(as(...e),e)}const it=O((e,t)=>{const{children:n,...r}=e,o=$e.toArray(n),i=o.find(Zd);if(i){const a=i.props.children,s=o.map(c=>c===i?$e.count(a)>1?$e.only(null):Ne(a)?a.props.children:null:c);return $(xo,F({},r,{ref:t}),Ne(a)?et(a,void 0,s):null)}return $(xo,F({},r,{ref:t}),n)});it.displayName="Slot";const xo=O((e,t)=>{const{children:n,...r}=e;return Ne(n)?et(n,{...Yd(r,n.props),ref:t?as(t,n.ref):n.ref}):$e.count(n)>1?$e.only(null):null});xo.displayName="SlotClone";const hn=({children:e})=>$(Y,null,e);function Zd(e){return Ne(e)&&e.type===hn}function Yd(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Qd(e){const{children:t,path:n,previous:r}=e,{push:o}=ze();return d(it,{onClick:()=>{o(n,r)},children:t})}we(Qd);function ef(e){const{index:t=!1,path:n,component:r}=e,{append:o,remove:i}=ze(),{current:a}=wo();return P(()=>(o({index:t,path:n}),()=>{i(n)}),[o,i,t,n]),a!==n?null:d(Y,{children:r})}const tf=we(ef);var Fe=(e=>(e.ON_APPEND="ON_APPEND",e.ON_REMOVE="ON_REMOVE",e.ON_PUSH="ON_PUSH",e.ON_BACK="ON_BACK",e.ON_INDEX="ON_INDEX",e))(Fe||{});const Co={index:"",current:"",previous:"",routes:[]};function nf(e=Co,t){switch(t.type){case Fe.ON_APPEND:{if(e.routes.some(o=>o.path===t.payload.path))return de(()=>{De(`Failed to append route "${t.payload.path}". This route has already been declared.`,"routerReducer.onAppend")}),e;const r=e.routes.find(o=>o.index);return r?(t.payload.index&&de(()=>{De(`Route "${r.path}" has already been declared as an index.`,"routerReducer.onAppend")}),{...e,routes:[...e.routes,{index:!1,path:t.payload.path}]}):{...e,index:t.payload.index?t.payload.path:e.index,current:!e.current&&t.payload.index?t.payload.path:e.current,routes:[...e.routes,{index:t.payload.index,path:t.payload.path}]}}case Fe.ON_REMOVE:{const n=e.routes.filter(r=>r.path!==t.payload.path);return n.length?{...e,index:e.index===t.payload.path?"":e.index,current:e.current===t.payload.path?"":e.current,previous:e.previous===t.payload.path?"":e.previous,routes:n}:Co}case Fe.ON_PUSH:{let n=e.current;return typeof t.payload.previous<"u"&&(typeof t.payload.previous=="string"?n=t.payload.previous:n=""),e.routes.find(i=>i.path===t.payload.path)?{...e,current:t.payload.path,previous:n}:(de(()=>{De(`Failed to push to "${t.payload.path}" route. This route was not declared.`,"routerReducer.onPush")}),e.routes.find(i=>i.path===ct)?{...e,current:ct,previous:n}:{...e,current:"",previous:n})}case Fe.ON_BACK:return e.routes.find(o=>o.path===e.previous)?{...e,current:e.previous,previous:e.current}:(de(()=>{De(`Failed to back to "${e.previous}" route. This route was not declared.`,"routerReducer.onBack")}),e.routes.find(o=>o.path===ct)?{...e,current:ct,previous:e.current}:{...e,current:"",previous:e.current});case Fe.ON_INDEX:return e.routes.find(o=>o.index)?{...e,current:e.index,previous:e.current}:(de(()=>{De(`Failed to push to "${e.index}" route. This route was not declared.`,"routerReducer.onIndex")}),e.routes.find(o=>o.path===ct)?{...e,current:ct,previous:e.current}:{...e,current:"",previous:e.current});default:throw new Error(`Unhandled action type: ${t.type}`)}}function rf(e){const{children:t}=e,[n,r]=Re(nf,Co),o=X(({index:f,path:p})=>{r({type:Fe.ON_APPEND,payload:{index:f,path:p}})},[]),i=X(f=>{r({type:Fe.ON_REMOVE,payload:{path:f}})},[]),a=X((f,p)=>{r({type:Fe.ON_PUSH,payload:{path:f,previous:p}})},[]),s=X(()=>{r({type:Fe.ON_BACK})},[]),c=X(()=>{r({type:Fe.ON_INDEX})},[]),u=te(()=>({append:o,remove:i,push:a,back:s,index:c}),[o,i,a,s,c]),l=te(()=>({index:n.index,current:n.current,previous:n.previous}),[n]);return d(os.Provider,{value:u,children:d(is.Provider,{value:l,children:t})})}var ss=typeof window>"u",So=ss?V.useEffect:V.useLayoutEffect,of=0,cs=()=>++of,ls=!1;function af(){let[e,t]=V.useState(ls?cs:void 0);return So(()=>{e===void 0&&t(cs()),ls=!0},[]),e===void 0?e:`rwb-${e.toString(32)}`}function sf(){return V.useMemo(()=>"useId"in V?V.useId:af,[])()}var ko="__wrap_b",mn="__wrap_n",us="__wrap_o",ds=(e,t,n)=>{n=n||document.querySelector(`[data-br="${e}"]`);let r=n.parentElement,o=l=>n.style.maxWidth=l+"px";n.style.maxWidth="";let i=r.clientWidth,a=r.clientHeight,s=i/2-.25,c=i+.5,u;if(i){for(o(s),s=Math.max(n.scrollWidth,s);s+1{self.__wrap_b(0,+n.dataset.brr,n)})).observe(r)},cf=ds.toString(),lf='(self.CSS&&CSS.supports("text-wrap","balance")?1:2)',fs=(e,t,n="")=>(n&&(n=`self.${mn}!=1&&${n}`),V.createElement("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:(e?"":`self.${mn}=self.${mn}||${lf};self.${ko}=${cf};`)+n},nonce:t})),ps=V.createContext({preferNative:!0,hasProvider:!1}),uf=({preferNative:e=!0,nonce:t,children:n})=>{let r=V.useMemo(()=>({preferNative:e,hasProvider:!0}),[e]);return V.createElement(ps.Provider,{value:r},fs(!1,t),n)},df=({ratio:e=1,preferNative:t,nonce:n,children:r,...o})=>{let i=sf(),a=V.useRef(),s=V.useContext(ps),c=t??s.preferNative,u=o.as||"span";return So(()=>{c&&self[mn]===1||a.current&&(self[ko]=ds)(0,e,a.current)},[r,c,e]),So(()=>{if(!(c&&self[mn]===1))return()=>{if(!a.current)return;let l=a.current[us];l&&(l.disconnect(),delete a.current[us])}},[c]),V.createElement(V.Fragment,null,V.createElement(u,{...o,"data-br":i,"data-brr":e,ref:a,style:{display:"inline-block",verticalAlign:"top",textDecoration:"inherit",textWrap:c?"balance":"initial"},suppressHydrationWarning:!0},r),fs(s.hasProvider,n,`self.${ko}("${i}",${e})`))};const hs=ue(null),ms=ue(null);function gn(){const e=me(hs);if(!e)throw new Error("usePostalCodeApi: is undefined, seems you forgot to wrap the components in ``");return e}function wt(){const e=me(ms);if(!e)throw new Error("usePostalCodeData: is undefined, seems you forgot to wrap the components in ``");return e}function gs(e,t){return e.test(t)}const bs=/^[a-zA-Z0-9]{8}$/;function vs(e){const t=/[^a-zA-Z0-9]/g,n=/([a-zA-Z0-9]{8}).+$/;return e.replace(t,"").replace(n,"$1")}var bn=(e=>(e.ON_CHANGE="ON_CHANGE",e.ON_CLEAR="ON_CLEAR",e))(bn||{});const Jn={valid:!1,value:""};function ff(e=Jn,t){switch(t.type){case bn.ON_CHANGE:return{...e,valid:gs(bs,t.payload.value),value:vs(t.payload.value)};case bn.ON_CLEAR:return Jn;default:throw new Error(`Unhandled action type: ${t.type}`)}}function pf(e){const{children:t}=e,[n,r]=Re(ff,Jn,hf),o=(c,u)=>{r({type:bn.ON_CHANGE,payload:{value:c}}),u==null||u()},i=c=>{r({type:bn.ON_CLEAR}),c==null||c()},a=te(()=>({change:o,clear:i}),[]),s=te(()=>n,[n]);return d(hs.Provider,{value:a,children:d(ms.Provider,{value:s,children:t})})}function hf(){if(!Mt().get().postalCode)return Jn;const{postalCode:e}=Be().get();return{valid:gs(bs,e),value:vs(e)}}const $s=ue(null),ys=ue(null);function mf(){const e=me($s);if(!e)throw new Error("useSettingsApi: is undefined, seems you forgot to wrap the components in ``");return e}function xt(){const e=me(ys);if(!e)throw new Error("useSettingsData: is undefined, seems you forgot to wrap the components in ``");return e}var vn=(e=>(e.ON_CHANGE_POSTAL_CODE_CONSENT="ON_CHANGE_POSTAL_CODE_CONSENT",e.ON_CHANGE_TRACKING_CONSENT="ON_CHANGE_TRACKING_CONSENT",e))(vn||{});const _s={consent:{postalCode:!0,tracking:!0}};function gf(e=_s,t){switch(t.type){case vn.ON_CHANGE_POSTAL_CODE_CONSENT:return{...e,consent:{...e.consent,postalCode:t.payload.consent}};case vn.ON_CHANGE_TRACKING_CONSENT:return{...e,consent:{...e.consent,tracking:t.payload.consent}};default:return e}}function bf(e){const{children:t}=e,n=Mt(),[r,o]=Re(gf,_s,vf),i=X((u,l)=>{o({type:vn.ON_CHANGE_POSTAL_CODE_CONSENT,payload:{consent:u}}),u&&n.set(f=>({...f,postalCode:u})),l==null||l()},[n]),a=X((u,l)=>{o({type:vn.ON_CHANGE_TRACKING_CONSENT,payload:{consent:u}}),u&&n.set(f=>({...f,tracking:u})),l==null||l()},[n]),s=te(()=>({onChangePostalCodeConsent:i,onChangeTrackingConsent:a}),[i,a]),c=te(()=>r,[r]);return d($s.Provider,{value:s,children:d(ys.Provider,{value:c,children:t})})}function vf(){return{consent:Mt().get()}}const ws=ue(null),xs=ue(null);function Eo(){const e=me(ws);if(!e)throw new Error("useRetailerApi: is undefined, seems you forgot to wrap the components in ``");return e}function $n(){const e=me(xs);if(!e)throw new Error("useRetailerData: is undefined, seems you forgot to wrap the components in ``");return e}function $f(e,t){return e.filter(t)}function yf(e){return $f(e,(t,n,r)=>n===r.findIndex(o=>o.id===t.id))}async function _f(e,t={}){const{geolocation:n,postalCode:r,recipeUrl:o}=e,{signal:i}=t,a=[...n?Object.entries(n):[],["postalcode",r],["url",o]],s=Yr("/supermarket-products",go);Qr(s,a);const{data:c,error:u}=await Lt(ln.get(s.toString(),{...i?{signal:i}:{}}));if(!(!c||u))return c.data.supermarkets}function wf(e){const[t,n]=M([]),[r,o]=M(null),[i,a]=M("idle");return P(()=>{const s=new AbortController;return(async()=>{a("pending");const u=await _f(e,{signal:s.signal});if(s.signal.aborted){a("canceled");return}if(!u){n([]),o(new Error("Failed to fetch retailers")),a("rejected");return}n(yf(u)),o(null),a("resolved")})(),()=>{s.abort()}},[e]),{data:t,error:r,status:i}}var Ct=(e=>(e.ON_SET="ON_SET",e.ON_CHANGE="ON_CHANGE",e.ON_CLEAR="ON_CLEAR",e))(Ct||{});let Zn;const xf=new Uint8Array(16);function Cf(){if(!Zn&&(Zn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Zn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Zn(xf)}const Sf=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function kf(e){return typeof e=="string"&&Sf.test(e)}const be=[];for(let e=0;e<256;++e)be.push((e+256).toString(16).slice(1));function Ef(e,t=0){return(be[e[t+0]]+be[e[t+1]]+be[e[t+2]]+be[e[t+3]]+"-"+be[e[t+4]]+be[e[t+5]]+"-"+be[e[t+6]]+be[e[t+7]]+"-"+be[e[t+8]]+be[e[t+9]]+"-"+be[e[t+10]]+be[e[t+11]]+be[e[t+12]]+be[e[t+13]]+be[e[t+14]]+be[e[t+15]]).toLowerCase()}const Cs={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ss(e,t,n){if(Cs.randomUUID&&!t&&!e)return Cs.randomUUID();e=e||{};const r=e.random||(e.rng||Cf)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let o=0;o<16;++o)t[n+o]=r[o];return t}return Ef(r)}function Oo(e){return{...e,_id:Ss()}}function ks(e,t=!1){return{...e,_active:t}}const Po={active:{},list:[]};function Of(e=Po,t){switch(t.type){case Ct.ON_SET:{const{active:n,list:r}=Pf(t.payload.list);return{...e,active:n,list:r}}case Ct.ON_CHANGE:{const n=Array.isArray(t.payload.list)?t.payload.list:t.payload.list(e.list),r=n.find(o=>o._active);return{...e,active:r,list:n}}case Ct.ON_CLEAR:return Po;default:throw new Error(`Unhandled action type: ${t.type}`)}}function Pf(e){const t=e.reduce((r,o,i)=>{const a=i%2===1;return Object.assign(o,{...Oo(o),...ks(o,!1),products:o.products.map(s=>{var c;return{...Oo(s),...ks(s,!s.common),swap:(c=s.swap)==null?void 0:c.map(Oo)}})}),a?r.push(o):r.unshift(o),r},[]).map((r,o)=>({...r,_index:o}));if(t.length&&!t.some(r=>r._active)){let r=0;t.length>2&&(r=Math.floor(t.length/2),t.length%2===0&&(r-=1)),t[r]._active=!0}return{active:t.find(r=>r._active),list:t}}function Af(e){const{children:t}=e,[n,r]=Re(Of,Po);function o(u,l){r({type:Ct.ON_SET,payload:{list:u}}),l==null||l()}function i(u,l){r({type:Ct.ON_CHANGE,payload:{list:u}}),l==null||l()}function a(u){r({type:Ct.ON_CLEAR}),u==null||u()}const s=te(()=>({onSet:o,onChange:i,onClear:a}),[]),c=te(()=>n,[n]);return d(ws.Provider,{value:s,children:d(xs.Provider,{value:c,children:t})})}const Es=ue(null),Os=ue(null);function Tf(){const e=me(Os);if(!e)throw new Error("useToastData: is undefined, seems you forgot to wrap the components in ``");return e}function Ps(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t{const{children:n,draggable:r=!1,target:o="_blank",rel:i="noopener noreferrer",size:a="md",...s}=e;return d(qf,{...s,ref:t,draggable:r,target:o,rel:i,size:a,as:"a",children:n})}),As=O(function(t,n){const{css:r={},utmCampaign:o,utmSource:i,...a}=t,s={...r,...Uf},c=Yr(Ml);return Qr(c,[["utm_campaign",o],["utm_medium",Wl],["utm_source",i]]),d(re,{...a,css:s,ref:n,children:d(Oe,{size:"sm",variant:"primary",href:c.toString(),style:{color:"#808080"},children:["Powered by ",Xr]})})}),Kf=Ce({$$height:"60px",zIndex:"$sticky",position:"relative",flex:"0 0 $$height",width:"$full",height:"$$height",paddingX:"$4",borderBottom:"1px solid $gray200",backgroundColor:"$$bgColor"}),St=O(function(t,n){const{children:r,bgColor:o="transparent",customBgColor:i,className:a,css:s={},...c}=t,u={...Kf,...s,$$bgColor:i??`$colors$${o}`};return d(H,{...c,align:"center",justify:"between",className:ye("r2b-header",a),css:u,ref:n,children:r})}),Xf=_t({display:"block",textTransform:"none",fontFamily:"$heading",color:"$gray900",variants:{size:{xs:{fontSize:"$sm",lineHeight:1.2},sm:{fontSize:"$md",lineHeight:1.2},md:{fontSize:"$xl",lineHeight:1.2},lg:{fontSize:"$2xl",lineHeight:1.33},xl:{fontSize:"$3xl",lineHeight:1.33},"2xl":{fontSize:"$4xl",lineHeight:1.2},"3xl":{"--r2b-line-clamp":1,display:"-webkit-box",lineHeight:1,fontSize:"$5xl",textOverflow:"ellipsis",overflow:"hidden","-webkit-box-orient":"vertical","-webkit-line-clamp":"var(--r2b-line-clamp)"}},weight:{light:{fontWeight:"$normal"},medium:{fontWeight:"$semibold"},heavy:{fontWeight:"$bold"}}},defaultVariants:{size:"md",weight:"medium"}}),le=O(function(t,n){const{asChild:r,children:o,className:i,css:a={},ratio:s=1,size:c="md",weight:u="medium",...l}=t,f=ye("r2b-heading",Xf({css:a,size:c,weight:u}).className,i);return d(r?it:"h2",{...l,className:f,ref:n,children:d(hn,{children:d(df,{ratio:s,children:o})})})}),Gf=_t({fontVariantNumeric:"tabular-nums",variants:{size:{xs:{fontSize:"$xs"},sm:{fontSize:"$sm"},md:{fontSize:"$md"},lg:{fontSize:"$lg"},xl:{fontSize:"$xl"},"2xl":{fontSize:"$2xl"},"3xl":{fontSize:"$3xl"},"4xl":{fontSize:"$4xl"},"5xl":{fontSize:"$5xl"}},variant:{currentColor:{color:"currentColor"},subdued:{color:"$gray700"},muted:{color:"$gray600"},disabled:{color:"$gray500"},success:{color:"$green900"},negative:{color:"$red900"}}},defaultVariants:{size:"md",variant:"currentColor"}}),R=O(function(t,n){const{asChild:r,children:o,className:i,css:a={},size:s="md",variant:c="currentColor",...u}=t,l=ye("r2b-text",Gf({css:a,size:s,variant:c}).className);return d(r?it:"p",{...u,className:l,ref:n,children:d(hn,{children:o})})}),Jf=Ce({position:"absolute",top:"50%",left:"50%",width:"$full",textAlign:"center",transform:"translate(-50%, -50%)"}),kt=O(function(t,n){const{children:r,className:o,css:i={},...a}=t,s={...Jf,...i};return d(le,{...a,className:ye("r2b-header-title",o),size:"sm",css:s,ref:n,children:r})}),Yn=Ce({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative",margin:0,fontWeight:"$semibold",lineHeight:"$shorter",border:"none",borderRadius:"$sm",outline:"transparent solid 2px",outlineOffset:"1px",transitionDuration:"$transitions$fast",transitionProperty:"background-color, color",transitionTimingFunction:"ease-in-out",verticalAlign:"middle",textTransform:"none",overflow:"visible",whiteSpace:"nowrap",userSelect:"none",appearance:"none",cursor:"auto",color:"currentColor","&:disabled":{opacity:.4,boxShadow:"none",cursor:"not-allowed"}}),Zf=z("button",{...Yn,variants:{variant:{accent:{},primary:{},secondary:{},negative:{}},style:{fill:{},outline:{}},size:{small:{minWidth:"24px",height:"24px",paddingInlineStart:"$2",paddingInlineEnd:"$2",fontSize:"$xs"},medium:{minWidth:"32px",height:"32px",paddingInlineStart:"$3",paddingInlineEnd:"$3",fontSize:"$sm"},large:{minWidth:"40px",height:"40px",paddingInlineStart:"$4",paddingInlineEnd:"$4",fontSize:"$md"},"extra-large":{minWidth:"48px",height:"48px",paddingInlineStart:"$6",paddingInlineEnd:"$6",fontSize:"$lg"}},staticColor:{black:{},white:{}},rounded:{true:{borderRadius:"$pill"}}},compoundVariants:[{variant:"accent",style:"fill",css:{color:"$white",backgroundColor:"$primary500","&:not(:disabled):hover":{backgroundColor:"$primary600"},"&:not(:disabled):active":{backgroundColor:"$primary700"}}},{variant:"accent",style:"outline",css:{color:"$primary500",borderColor:"$primary500",backgroundColor:"$transparent","&:not(:disabled):hover":{backgroundColor:"$primary50"},"&:not(:disabled):active":{backgroundColor:"$primary100"}}},{variant:"primary",style:"fill",css:{color:"$white",backgroundColor:"$gray700","&:not(:disabled):hover":{backgroundColor:"$gray800"},"&:not(:disabled):active":{backgroundColor:"$gray900"}}},{variant:"primary",style:"outline",css:{color:"$gray700",borderColor:"$gray700",backgroundColor:"$transparent","&:not(:disabled):hover":{backgroundColor:"$gray100"},"&:not(:disabled):active":{backgroundColor:"$gray200"}}},{variant:"secondary",style:"fill",css:{color:"$gray900",backgroundColor:"$gray500","&:not(:disabled):hover":{backgroundColor:"$gray600"},"&:not(:disabled):active":{backgroundColor:"$gray700"}}},{variant:"secondary",style:"outline",css:{color:"$gray900",borderColor:"$gray500",backgroundColor:"$transparent","&:not(:disabled):hover":{backgroundColor:"$gray50"},"&:not(:disabled):active":{backgroundColor:"$gray100"}}},{variant:"negative",style:"fill",css:{color:"$white",backgroundColor:"$red900","&:not(:disabled):hover":{backgroundColor:"$red1000"},"&:not(:disabled):active":{backgroundColor:"$red1100"}}},{variant:"negative",style:"outline",css:{color:"$red900",borderColor:"$red900",backgroundColor:"$transparent","&:not(:disabled):hover":{backgroundColor:"$red50"},"&:not(:disabled):active":{backgroundColor:"$red100"}}}],defaultVariants:{variant:"primary",style:"fill",size:"medium",rounded:!1}}),Yf=O(function(t,n){const{label:r,icon:o,variant:i="primary",staticColor:a,style:s="fill",size:c="medium",rounded:u=!1,className:l,...f}=t;return d(Zf,{...f,variant:i,style:s,size:c,rounded:u,className:ye("r2b-button",l),ref:n,children:[o,r]})}),Qf=z("button",{...Yn,minWidth:"32px",height:"32px",padding:0,fontSize:"$md",borderRadius:"$sm",backgroundColor:"$transparent","&:hover":{backgroundColor:"$blackAlpha100"},"&:active":{backgroundColor:"$blackAlpha200"}}),Se=O(function(t,n){const{className:r,css:o={},icon:i,...a}=t;return d(Qf,{...a,className:ye("r2b-header-button",r),css:o,ref:n,children:i})}),ep=O(function(t,n){const{children:r,className:o,css:i={},...a}=t;return d(H,{...a,align:"center",className:ye("r2b-header-group",o),css:i,ref:n,children:r})}),tp=_t({$$height:"40px",zIndex:"$sticky",position:"relative",flex:"0 0 $$height",width:"$full",height:"$$height",borderBottom:"1px solid $gray200",backgroundColor:"$white"}),Ts=O(function(t,n){const{children:r,className:o,css:i={},...a}=t,s=ye("r2b-toolbar",tp({css:i}).className,o);return d(H,{...a,align:"center",justify:"center",className:s,ref:n,children:r})}),np=_t({...Yn,minWidth:"32px",height:"32px",paddingX:"$4",fontSize:"$sm",fontWeight:"$normal",lineHeight:1,borderRadius:"$sm",backgroundColor:"$transparent","&:hover":{backgroundColor:"$blackAlpha50"},"&:active":{backgroundColor:"$blackAlpha100"},"& > span":{marginInlineEnd:"$2"}}),Rs=O(function(t,n){const{className:r,css:o={},icon:i,label:a,...s}=t,c=ye("r2b-toolbar-button",np({css:o}).className,r);return d("button",{...s,className:c,ref:n,children:[d("span",{children:i}),a]})});function Is(){const e=me(Es);if(!e)throw new Error("useToastApi: is undefined, seems you forgot to wrap the components in ``");return e}const rp=Ce({fx:"1 1 auto",my:"auto",p:"$1","& > div:last-child":{fx:1,lh:1.25,fz:"$sm",wob:"break-word"}});function op(e){const{children:t}=e;return d(H,{role:"alert",align:"center",css:rp,children:t})}const ip=z("svg",{display:"inline-block",flexShrink:0,width:"1em",height:"1em",lineHeight:"1em",color:"currentColor",verticalAlign:"middle",userSelect:"none",variants:{size:{em:{fontSize:"1em"},xs:{fontSize:"$sm","@md":{fontSize:"$md"}},sm:{fontSize:"$md","@md":{fontSize:"$lg"}},md:{fontSize:"$xl","@md":{fontSize:"$2xl"}},lg:{fontSize:"$2xl","@md":{fontSize:"$3xl"}},xl:{fontSize:"$3xl","@md":{fontSize:"$4xl"}},"2xl":{fontSize:"$4xl","@md":{fontSize:"$5xl"}}}},defaultVariants:{size:"em"}}),N=O(({as:e,...t},n)=>d(ip,{...t,as:e,ref:n})),Ns=e=>$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},$("path",{d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z",fill:"currentColor"})),Ao=e=>$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},$("path",{d:"M19 11H7.83l4.88-4.88c.39-.39.39-1.03 0-1.42-.39-.39-1.02-.39-1.41 0l-6.59 6.59c-.39.39-.39 1.02 0 1.41l6.59 6.59c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L7.83 13H19c.55 0 1-.45 1-1s-.45-1-1-1z",fill:"currentColor"})),ap=e=>$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},$("path",{d:"M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 3c0 .55.45 1 1 1h1l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h11c.55 0 1-.45 1-1s-.45-1-1-1H7l1.1-2h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.67-1.43c-.16-.35-.52-.57-.9-.57H2c-.55 0-1 .45-1 1zm16 15c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z",fill:"currentColor"})),sp=e=>$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},$("path",{d:"M9 16.17L5.53 12.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41l4.18 4.18c.39.39 1.02.39 1.41 0L20.29 7.71c.39-.39.39-1.02 0-1.41-.39-.39-1.02-.39-1.41 0L9 16.17z",fill:"currentColor"})),cp=e=>$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},$("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM9.29 16.29 5.7 12.7c-.39-.39-.39-1.02 0-1.41.39-.39 1.02-.39 1.41 0L10 14.17l6.88-6.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-7.59 7.59c-.38.39-1.02.39-1.41 0z",fill:"currentColor"})),je=e=>$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},$("path",{d:"M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z",fill:"currentColor"})),Ds=e=>$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},$("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v10zM18 4h-2.5l-.71-.71c-.18-.18-.44-.29-.7-.29H9.91c-.26 0-.52.11-.7.29L8.5 4H6c-.55 0-1 .45-1 1s.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1z",fill:"currentColor"})),Bs=e=>$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},$("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 11c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z",fill:"currentColor"})),zs=e=>$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},$("path",{d:"M15.88 9.29L12 13.17 8.12 9.29c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41l4.59 4.59c.39.39 1.02.39 1.41 0l4.59-4.59c.39-.39.39-1.02 0-1.41-.39-.38-1.03-.39-1.42 0z",fill:"currentColor"})),Qn=e=>$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},$("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 15c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1zm1-8h-2V7h2v2z",fill:"currentColor"})),lp=e=>$("svg",{xmlns:"http://www.w3.org/2000/svg",enableBackground:"new 0 0 24 24",viewBox:"0 0 24 24",fill:"currentColor",...e},$("g",null,$("rect",{fill:"none",height:24,width:24}),$("rect",{fill:"none",height:24,width:24})),$("g",null,$("g",null,$("path",{d:"M21,8c-1.45,0-2.26,1.44-1.93,2.51l-3.55,3.56c-0.3-0.09-0.74-0.09-1.04,0l-2.55-2.55C12.27,10.45,11.46,9,10,9 c-1.45,0-2.27,1.44-1.93,2.52l-4.56,4.55C2.44,15.74,1,16.55,1,18c0,1.1,0.9,2,2,2c1.45,0,2.26-1.44,1.93-2.51l4.55-4.56 c0.3,0.09,0.74,0.09,1.04,0l2.55,2.55C12.73,16.55,13.54,18,15,18c1.45,0,2.27-1.44,1.93-2.52l3.56-3.55 C21.56,12.26,23,11.45,23,10C23,8.9,22.1,8,21,8z"}),$("polygon",{points:"15,9 15.94,6.93 18,6 15.94,5.07 15,3 14.08,5.07 12,6 14.08,6.93"}),$("polygon",{points:"3.5,11 4,9 6,8.5 4,8 3.5,6 3,8 1,8.5 3,9"})))),er=e=>$("svg",{viewBox:"0 0 480 480",fill:"currentColor",...e},$("g",null,$("path",{d:"M440 72H40C17.92 72.026.026 89.92 0 112v256c.026 22.08 17.92 39.974 40 40h400a37.03 37.03 0 0 0 6.696-.584C465.945 404.194 480.037 387.517 480 368V112c-.026-22.081-17.92-39.974-40-40zM40 392c-12.435-.002-22.81-9.501-23.904-21.888L175.6 265.824 337.808 392H40zm424-24c.013 11.742-8.492 21.761-20.08 23.656A21.746 21.746 0 0 1 440 392h-76.136l-105.992-82.488 94.784-75.792L464 300.528V368zm0-86.128-107.88-64.728a8 8 0 0 0-9.12.608l-102.136 81.68-63.96-49.744a8 8 0 0 0-9.28-.384L16 351.056V112c0-13.255 10.745-24 24-24h400c13.255 0 24 10.745 24 24v169.872z"}),$("path",{d:"M240 120c-26.51 0-48 21.49-48 48 .026 26.499 21.501 47.974 48 48 26.51 0 48-21.49 48-48s-21.49-48-48-48zm0 80c-17.673 0-32-14.327-32-32s14.327-32 32-32c17.673 0 32 14.327 32 32s-14.327 32-32 32z"}))),To=e=>$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},$("path",{d:"M12 2c-4.2 0-8 3.22-8 8.2 0 3.18 2.45 6.92 7.34 11.23.38.33.95.33 1.33 0C17.55 17.12 20 13.38 20 10.2 20 5.22 16.2 2 12 2zm0 10c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z",fill:"currentColor"})),Fs=e=>$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},$("path",{d:"M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1z",fill:"currentColor"})),up=e=>$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},$("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1 3.5a1 1 0 0 1 1-1h20a1 1 0 0 1 1 1V9a1 1 0 1 1-2 0V4.5H3v13h2.5a1 1 0 0 1 1 1v.882l3.553-1.776a.999.999 0 0 1 .447-.106h2.25a1 1 0 1 1 0 2h-2.014l-4.789 2.394A1 1 0 0 1 4.5 21v-1.5H2a1 1 0 0 1-1-1v-15Z",fill:"currentColor"}),$("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 7.5a1 1 0 0 1 1-1h3a1 1 0 0 1 0 2H6a1 1 0 0 1-1-1Zm0 3a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H6a1 1 0 0 1-1-1Zm13.291-.457L18 11l-.291-.957a1 1 0 0 1 .582 0ZM18 19c-.52.854-.52.854-.521.853h-.001l-.002-.001-.005-.003-.014-.009a3.076 3.076 0 0 1-.179-.12 7.765 7.765 0 0 1-.456-.344 9.535 9.535 0 0 1-1.345-1.342c-.978-1.192-1.977-3.009-1.977-5.434 0-.308.124-.54.216-.674a1.6 1.6 0 0 1 .292-.314c.174-.146.38-.27.568-.37a12.1 12.1 0 0 1 1.318-.577 30.158 30.158 0 0 1 1.77-.608l.032-.01.012-.004L18 11l.291-.957.013.004.031.01a29.595 29.595 0 0 1 .525.168c.337.111.79.267 1.246.44a12.1 12.1 0 0 1 1.318.578c.187.1.394.223.568.369a1.6 1.6 0 0 1 .291.314c.093.133.217.366.217.674 0 2.425-.999 4.242-1.977 5.434a9.535 9.535 0 0 1-1.345 1.342 7.765 7.765 0 0 1-.635.464l-.014.009-.005.003h-.002v.001c-.001 0-.002 0-.522-.853Zm0 0-.52.854a1 1 0 0 0 1.04 0L18 19Zm.524-.852h-.002.002ZM18 17.755a7.556 7.556 0 0 1-.977-.99c-.713-.87-1.41-2.117-1.51-3.755l.005-.003c.271-.145.662-.31 1.088-.473A28.083 28.083 0 0 1 18 12.048l.233.077c.32.105.742.25 1.161.41.426.162.817.327 1.089.472l.004.003c-.1 1.638-.796 2.886-1.51 3.756-.35.427-.7.757-.977.989Zm-.523.392v.001Zm0 .001Z",fill:"currentColor"})),tr=e=>$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},$("path",{d:"M19.5 12c0-.23-.01-.45-.03-.68l1.86-1.41c.4-.3.51-.86.26-1.3l-1.87-3.23a.987.987 0 0 0-1.25-.42l-2.15.91c-.37-.26-.76-.49-1.17-.68l-.29-2.31c-.06-.5-.49-.88-.99-.88h-3.73c-.51 0-.94.38-1 .88l-.29 2.31c-.41.19-.8.42-1.17.68l-2.15-.91c-.46-.2-1-.02-1.25.42L2.41 8.62c-.25.44-.14.99.26 1.3l1.86 1.41a7.343 7.343 0 0 0 0 1.35l-1.86 1.41c-.4.3-.51.86-.26 1.3l1.87 3.23c.25.44.79.62 1.25.42l2.15-.91c.37.26.76.49 1.17.68l.29 2.31c.06.5.49.88.99.88h3.73c.5 0 .93-.38.99-.88l.29-2.31c.41-.19.8-.42 1.17-.68l2.15.91c.46.2 1 .02 1.25-.42l1.87-3.23c.25-.44.14-.99-.26-1.3l-1.86-1.41c.03-.23.04-.45.04-.68zm-7.46 3.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z",fill:"currentColor"})),dp=e=>$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},$("path",{d:"M12 2C6.486 2 2 6.486 2 12v4.143C2 17.167 2.897 18 4 18h1a1 1 0 0 0 1-1v-5.143a1 1 0 0 0-1-1h-.908C4.648 6.987 7.978 4 12 4s7.352 2.987 7.908 6.857H19a1 1 0 0 0-1 1V18c0 1.103-.897 2-2 2h-2v-1h-4v3h6c2.206 0 4-1.794 4-4 1.103 0 2-.833 2-1.857V12c0-5.514-4.486-10-10-10Z",fill:"currentColor"})),fp=e=>$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},$("path",{d:"M6.14 11.86l-2.78 2.79c-.19.2-.19.51 0 .71l2.78 2.79c.31.32.85.09.85-.35V16H13c.55 0 1-.45 1-1s-.45-1-1-1H6.99v-1.79c0-.45-.54-.67-.85-.35zm14.51-3.21l-2.78-2.79c-.31-.32-.85-.09-.85.35V8H11c-.55 0-1 .45-1 1s.45 1 1 1h6.01v1.79c0 .45.54.67.85.35l2.78-2.79c.2-.19.2-.51.01-.7z",fill:"currentColor"})),pp=e=>$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},$("path",{d:"M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3zM12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z",fill:"currentColor"})),hp=Ce({size:"1em",mie:"$2",fz:"20px",c:"$$toastIconColor"}),mp={error:()=>d(N,{as:Bs}),info:()=>d(N,{as:Qn}),success:()=>d(N,{as:cp}),warning:()=>d(N,{as:pp})};function gp(e){const{type:t}=e,n=mp[t]();return d(H,{align:"center",css:hp,children:n})}const bp=Ut({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),vp=z("div",{display:"inline-block",size:"1em",flexShrink:0,color:"currentcolor",borderTop:"2px solid currentcolor",borderRight:"2px solid currentcolor",borderLeftStyle:"solid",borderBottomStyle:"solid",borderRadius:"$pill",borderLeftWidth:"2px",borderBottomWidth:"2px",borderLeftColor:"transparent",borderBottomColor:"transparent",animation:`0.45s linear 0s infinite normal none running ${bp}`,"& > span":{position:"absolute",width:"1px",height:"1px",margin:"-1px",padding:"0px",border:"0px",whiteSpace:"nowrap",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)"}}),$p=e=>d(vp,{...e,children:d("span",{children:"Loading..."})}),yp=z("button",{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative",margin:0,fontWeight:"$semibold",lineHeight:"$shorter",border:"none",borderRadius:"$sm",outline:"transparent solid 2px",outlineOffset:"1px",transitionDuration:"$transitions$fast",transitionProperty:"background-color, color",transitionTimingFunction:"ease-in-out",verticalAlign:"middle",textTransform:"none",overflow:"visible",whiteSpace:"nowrap",userSelect:"none",appearance:"none",cursor:"pointer",color:"currentColor","&:disabled":{opacity:.4,boxShadow:"none",cursor:"not-allowed"}}),Pe=z(yp,{variants:{size:{xs:{minWidth:"24px",height:"24px",paddingInlineStart:"$2",paddingInlineEnd:"$2",fontSize:"$xs"},sm:{minWidth:"32px",height:"32px",paddingInlineStart:"$3",paddingInlineEnd:"$3",fontSize:"$sm"},md:{minWidth:"40px",height:"40px",paddingInlineStart:"$4",paddingInlineEnd:"$4",fontSize:"$md"},lg:{minWidth:"48px",height:"48px",paddingInlineStart:"$6",paddingInlineEnd:"$6",fontSize:"$lg"}},variant:{ghost:{backgroundColor:"transparent"},outline:{backgroundColor:"transparent",borderWidth:"$xs",borderStyle:"$solid",borderImage:"initial"},solid:{},link:{minWidth:"auto",height:"auto",padding:0,backgroundColor:"transparent","&:not(:disabled):hover":{textDecoration:"underline"}}},colorScheme:{blue:{},gray:{},green:{},primary:{}},rounded:{true:{borderRadius:"$pill"}}},compoundVariants:[{variant:"ghost",colorScheme:"blue",css:{color:"$blue600","&:not(:disabled):hover":{backgroundColor:"$blue50"},"&:not(:disabled):active":{backgroundColor:"$blue100"}}},{variant:"ghost",colorScheme:"gray",css:{color:"inherit","&:not(:disabled):hover":{backgroundColor:"$gray200"},"&:not(:disabled):active":{backgroundColor:"$gray300"}}},{variant:"ghost",colorScheme:"green",css:{color:"$green600","&:not(:disabled):hover":{backgroundColor:"$green50"},"&:not(:disabled):active":{backgroundColor:"$green100"}}},{variant:"ghost",colorScheme:"primary",css:{color:"$primary600","&:not(:disabled):hover":{backgroundColor:"$primary50"},"&:not(:disabled):active":{backgroundColor:"$primary100"}}},{variant:"outline",colorScheme:"blue",css:{color:"$blue600",borderColor:"$blue200","&:not(:disabled):hover":{backgroundColor:"$blue50"},"&:not(:disabled):active":{backgroundColor:"$blue100"}}},{variant:"outline",colorScheme:"gray",css:{color:"$gray700",borderColor:"$gray200","&:not(:disabled):hover":{backgroundColor:"$gray100"},"&:not(:disabled):active":{backgroundColor:"$gray200"}}},{variant:"outline",colorScheme:"green",css:{color:"$green600",borderColor:"$green200","&:not(:disabled):hover":{backgroundColor:"$green50"},"&:not(:disabled):active":{backgroundColor:"$green100"}}},{variant:"outline",colorScheme:"primary",css:{color:"$primary600",borderColor:"$primary200","&:not(:disabled):hover":{backgroundColor:"$primary50"},"&:not(:disabled):active":{backgroundColor:"$primary100"}}},{variant:"solid",colorScheme:"blue",css:{backgroundColor:"$blue900",color:"$white","&:not(:disabled):hover":{backgroundColor:"$blue1000"},"&:not(:disabled):active":{backgroundColor:"$blue1100"}}},{variant:"solid",colorScheme:"gray",css:{backgroundColor:"$gray200","&:not(:disabled):hover":{backgroundColor:"$gray300"},"&:not(:disabled):active":{backgroundColor:"$gray400"}}},{variant:"solid",colorScheme:"green",css:{backgroundColor:"$green500",color:"$white","&:not(:disabled):hover":{backgroundColor:"$green600"},"&:not(:disabled):active":{backgroundColor:"$green700"}}},{variant:"solid",colorScheme:"primary",css:{backgroundColor:"$primary500",color:"$white","&:not(:disabled):hover":{backgroundColor:"$primary600"},"&:not(:disabled):active":{backgroundColor:"$primary700"}}},{variant:"link",colorScheme:"blue",css:{color:"$blue500","&:not(:disabled):active":{color:"$blue700"}}},{variant:"link",colorScheme:"gray",css:{color:"$gray500","&:not(:disabled):active":{color:"$gray700"}}},{variant:"link",colorScheme:"green",css:{color:"$green500","&:not(:disabled):active":{color:"$green700"}}},{variant:"link",colorScheme:"primary",css:{color:"$primary600","&:not(:disabled):active":{color:"$primary700"}}}],defaultVariants:{size:"md",variant:"solid",colorScheme:"gray",rounded:!1}}),Ue=z(Pe,{paddingInline:"0 !important",padding:"0 !important","& svg":{size:"1em"}}),_p=Ce({pi:"0 !important",p:"0 !important",c:"$gray800",op:.3,"&:focus, &:hover":{op:1}});function wp(e){const{onClick:t}=e;return d(Ue,{type:"button",onClick:t,variant:"ghost",size:"xs",css:_p,children:d(N,{as:je})})}const xp=Ut({from:{op:0,trf:"translateX(-8px)"},to:{op:1,trf:"translateX(0)"}}),Cp=Ut({from:{op:1,trf:"translateX(0)"},to:{op:0,trf:"translateX(-8px)"}}),Sp=Ce({z:0,pos:"relative",mih:"64px",mah:"800px",mb:"$4",p:"$2",bdrs:"$sm",c:"$gray800",bgc:"#fff",bdlw:"6px",bdls:"solid",bxsh:"0 1px 10px 0 rgba(0,0,0,.1), 0 2px 15px 0 rgba(0,0,0,.05)",cur:"default",ov:"hidden",animdur:"0.3s",animtf:"ease-in-out",animfm:"forwards",willChange:"transform, opacity","&.toast--show":{animn:xp},"&.toast--hide":{animn:Cp}}),kp={default:{$$toastIconColor:"currentColor",bdlc:"$$toastIconColor"},error:{$$toastIconColor:"#e74c3c",bdlc:"$$toastIconColor"},info:{$$toastIconColor:"#3498db",bdlc:"$$toastIconColor"},success:{$$toastIconColor:"#07bc0c",bdlc:"$$toastIconColor"},warning:{$$toastIconColor:"#f1c40f",bdlc:"$$toastIconColor"}};function Ep(e){const{onClose:t,onOpen:n,autoClose:r,children:o,type:i="default",id:a}=e,{current:s}=wo(),c=I(null),{onDismiss:u}=Is(),l=i!=="default",f={...kp[i]};P(()=>(n==null||n(),()=>{t==null||t()}),[t,n]);function p(){var m;(m=c.current)!=null&&m.classList.contains("toast--hide")&&u(a)}function h(){var m,g;(m=c.current)==null||m.classList.remove("toast--show"),(g=c.current)==null||g.classList.add("toast--hide")}return P(()=>{if(typeof r!="number"&&!r)return;const m=window.setTimeout(h,r);return()=>{window.clearTimeout(m)}},[r]),d(H,{ref:c,className:"toast--show",onAnimationEnd:p,css:{...Sp,...f,display:s==="/retailer/loading"||s==="/retailer/not-found"?"none":"flex"},children:[d(op,{children:[l&&d(gp,{type:i}),d("div",{children:o})]}),d(wp,{onClick:h})]})}const Op={"top-left":{t:"$4",l:"$4"},"top-center":{t:"$4",l:"50%",trf:"translateX(-50%)"},"top-right":{t:"$4",r:"$4"},"bottom-left":{b:"$4",l:"$4"},"bottom-center":{b:"$4",l:"50%",trf:"translateX(-50%)"},"bottom-right":{b:"$4",r:"$4"}},Pp=Ce({$$width:"320px",z:"$toast",pos:"absolute",p:"$1",w:"$$width","-webkit-transform":"translate3d(0, 0, $zIndices$toast)"});function Ap(e){const{autoClose:t=3e3,position:n="top-right"}=e,{queue:r}=Tf(),o={...Op[n]};return d(re,{css:{...Pp,...o},children:r.map(({content:i,...a})=>d(Ep,{...a,autoClose:t,children:i},a.id))})}function Ro(){return Is().onPush}var yn=(e=>(e.ON_DISMISS="ON_DISMISS",e.ON_PUSH="ON_PUSH",e))(yn||{});const Ls={toastId:0,queue:[]};function Tp(e=Ls,t){switch(t.type){case yn.ON_DISMISS:return{...e,queue:e.queue.filter(n=>n.id!==t.payload)};case yn.ON_PUSH:{const n=e.toastId+1;return e.queue.some(o=>o.content===t.payload.content)?e:{...e,toastId:n,queue:[...e.queue,{...t.payload,id:"toast-"+n}]}}default:throw new Error(`Unhandled action type: ${t.type}`)}}function Rp(e){const{children:t}=e,[n,r]=Re(Tp,Ls);function o(c){r({type:yn.ON_DISMISS,payload:c})}function i(c){r({type:yn.ON_PUSH,payload:c})}const a=te(()=>({onDismiss:o,onPush:i}),[]),s=te(()=>n,[n]);return d(Es.Provider,{value:a,children:d(Os.Provider,{value:s,children:t})})}function Ip(e){const{children:t}=e;return d(uf,{children:d(pf,{children:d(bf,{children:d(Af,{children:d(Rp,{children:t})})})})})}function Ve(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Np(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Ms(...e){return t=>e.forEach(n=>Np(n,t))}function Et(...e){return X(Ms(...e),e)}function Ws(e,t=[]){let n=[];function r(i,a){const s=ue(a),c=n.length;n=[...n,a];function u(f){const{scope:p,children:h,...m}=f,g=(p==null?void 0:p[e][c])||s,b=te(()=>m,Object.values(m));return $(g.Provider,{value:b},h)}function l(f,p){const h=(p==null?void 0:p[e][c])||s,m=me(h);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,l]}const o=()=>{const i=n.map(a=>ue(a));return function(s){const c=(s==null?void 0:s[e])||i;return te(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,Dp(o,...t)]}function Dp(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:c,scopeName:u})=>{const f=c(i)[`__scope${u}`];return{...s,...f}},{});return te(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}const nr=globalThis!=null&&globalThis.document?Ie:()=>{},Bp=fa["useId".toString()]||(()=>{});let zp=0;function Io(e){const[t,n]=M(Bp());return nr(()=>{e||n(r=>r??String(zp++))},[e]),e||(t?`radix-${t}`:"")}function Ot(e){const t=I(e);return P(()=>{t.current=e}),te(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Hs({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Fp({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Ot(n),c=X(u=>{if(i){const f=typeof u=="function"?u(e):u;f!==e&&s(f)}else o(u)},[i,e,o,s]);return[a,c]}function Fp({defaultProp:e,onChange:t}){const n=M(e),[r]=n,o=I(r),i=Ot(t);return P(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const rr=O((e,t)=>{const{children:n,...r}=e,o=$e.toArray(n),i=o.find(Mp);if(i){const a=i.props.children,s=o.map(c=>c===i?$e.count(a)>1?$e.only(null):Ne(a)?a.props.children:null:c);return $(No,F({},r,{ref:t}),Ne(a)?et(a,void 0,s):null)}return $(No,F({},r,{ref:t}),n)});rr.displayName="Slot";const No=O((e,t)=>{const{children:n,...r}=e;return Ne(n)?et(n,{...Wp(r,n.props),ref:Ms(t,n.ref)}):$e.count(n)>1?$e.only(null):null});No.displayName="SlotClone";const Lp=({children:e})=>$(Y,null,e);function Mp(e){return Ne(e)&&e.type===Lp}function Wp(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const dt=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=O((r,o)=>{const{asChild:i,...a}=r,s=i?rr:t;return P(()=>{window[Symbol.for("radix-ui")]=!0},[]),$(s,F({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Hp(e,t){e&&nn(()=>e.dispatchEvent(t))}function jp(e,t=globalThis==null?void 0:globalThis.document){const n=Ot(e);P(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const Do="dismissableLayer.update",Up="dismissableLayer.pointerDownOutside",Vp="dismissableLayer.focusOutside";let js;const qp=ue({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Kp=O((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...u}=e,l=me(qp),[f,p]=M(null),h=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,m]=M({}),g=Et(t,E=>p(E)),b=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=b.indexOf(v),w=f?b.indexOf(f):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,T=w>=y,B=Xp(E=>{const K=E.target,J=[...l.branches].some(ie=>ie.contains(K));!T||J||(i==null||i(E),s==null||s(E),E.defaultPrevented||c==null||c())},h),A=Gp(E=>{const K=E.target;[...l.branches].some(ie=>ie.contains(K))||(a==null||a(E),s==null||s(E),E.defaultPrevented||c==null||c())},h);return jp(E=>{w===l.layers.size-1&&(o==null||o(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},h),P(()=>{if(f)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(js=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),Us(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=js)}},[f,h,r,l]),P(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),Us())},[f,l]),P(()=>{const E=()=>m({});return document.addEventListener(Do,E),()=>document.removeEventListener(Do,E)},[]),$(dt.div,F({},u,{ref:g,style:{pointerEvents:C?T?"auto":"none":void 0,...e.style},onFocusCapture:Ve(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Ve(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Ve(e.onPointerDownCapture,B.onPointerDownCapture)}))});function Xp(e,t=globalThis==null?void 0:globalThis.document){const n=Ot(e),r=I(!1),o=I(()=>{});return P(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){Vs(Up,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Gp(e,t=globalThis==null?void 0:globalThis.document){const n=Ot(e),r=I(!1);return P(()=>{const o=i=>{i.target&&!r.current&&Vs(Vp,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Us(){const e=new CustomEvent(Do);document.dispatchEvent(e)}function Vs(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Hp(o,i):o.dispatchEvent(i)}const Bo="focusScope.autoFocusOnMount",zo="focusScope.autoFocusOnUnmount",qs={bubbles:!1,cancelable:!0},Jp=O((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,c]=M(null),u=Ot(o),l=Ot(i),f=I(null),p=Et(t,g=>c(g)),h=I({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P(()=>{if(r){let g=function(v){if(h.paused||!s)return;const y=v.target;s.contains(y)?f.current=y:Pt(f.current,{select:!0})},b=function(v){h.paused||!s||s.contains(v.relatedTarget)||Pt(f.current,{select:!0})};return document.addEventListener("focusin",g),document.addEventListener("focusout",b),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",b)}}},[r,s,h.paused]),P(()=>{if(s){Gs.add(h);const g=document.activeElement;if(!s.contains(g)){const v=new CustomEvent(Bo,qs);s.addEventListener(Bo,u),s.dispatchEvent(v),v.defaultPrevented||(Zp(nh(Ks(s)),{select:!0}),document.activeElement===g&&Pt(s))}return()=>{s.removeEventListener(Bo,u),setTimeout(()=>{const v=new CustomEvent(zo,qs);s.addEventListener(zo,l),s.dispatchEvent(v),v.defaultPrevented||Pt(g??document.body,{select:!0}),s.removeEventListener(zo,l),Gs.remove(h)},0)}}},[s,u,l,h]);const m=X(g=>{if(!n&&!r||h.paused)return;const b=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,v=document.activeElement;if(b&&v){const y=g.currentTarget,[w,C]=Yp(y);w&&C?!g.shiftKey&&v===C?(g.preventDefault(),n&&Pt(w,{select:!0})):g.shiftKey&&v===w&&(g.preventDefault(),n&&Pt(C,{select:!0})):v===y&&g.preventDefault()}},[n,r,h.paused]);return $(dt.div,F({tabIndex:-1},a,{ref:p,onKeyDown:m}))});function Zp(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Pt(r,{select:t}),document.activeElement!==n)return}function Yp(e){const t=Ks(e),n=Xs(t,e),r=Xs(t.reverse(),e);return[n,r]}function Ks(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Xs(e,t){for(const n of e)if(!Qp(n,{upTo:t}))return n}function Qp(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function eh(e){return e instanceof HTMLInputElement&&"select"in e}function Pt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&eh(e)&&t&&e.select()}}const Gs=th();function th(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Js(e,t),e.unshift(t)},remove(t){var n;e=Js(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Js(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function nh(e){return e.filter(t=>t.tagName!=="A")}const rh=O((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?V.createPortal($(dt.div,F({},o,{ref:t})),r):null});function oh(e,t){return Re((n,r)=>{const o=t[n][r];return o??n},e)}const _n=e=>{const{present:t,children:n}=e,r=ih(t),o=typeof n=="function"?n({present:r.isPresent}):$e.only(n),i=Et(r.ref,o.ref);return typeof n=="function"||r.isPresent?et(o,{ref:i}):null};_n.displayName="Presence";function ih(e){const[t,n]=M(),r=I({}),o=I(e),i=I("none"),a=e?"mounted":"unmounted",[s,c]=oh(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P(()=>{const u=or(r.current);i.current=s==="mounted"?u:"none"},[s]),nr(()=>{const u=r.current,l=o.current;if(l!==e){const p=i.current,h=or(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(l&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),nr(()=>{if(t){const u=f=>{const h=or(r.current).includes(f.animationName);f.target===t&&h&&nn(()=>c("ANIMATION_END"))},l=f=>{f.target===t&&(i.current=or(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:X(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function or(e){return(e==null?void 0:e.animationName)||"none"}let Fo=0;function ah(){P(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:Zs()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:Zs()),Fo++,()=>{Fo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Fo--}},[])}function Zs(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var qe=function(){return qe=Object.assign||function(t){for(var n,r=1,o=arguments.length;r"u")return xh;var t=Ch(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},kh=nc(),Eh=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` .`.concat(ch,` { overflow: hidden `).concat(r,`; padding-right: `).concat(s,"px ").concat(r,`; } body { overflow: hidden `).concat(r,`; overscroll-behavior: contain; `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` padding-left: `.concat(o,`px; padding-top: `).concat(i,`px; padding-right: `).concat(a,`px; margin-left:0; margin-top:0; margin-right: `).concat(s,"px ").concat(r,`; `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` } .`).concat(ir,` { right: `).concat(s,"px ").concat(r,`; } .`).concat(ar,` { margin-right: `).concat(s,"px ").concat(r,`; } .`).concat(ir," .").concat(ir,` { right: 0 `).concat(r,`; } .`).concat(ar," .").concat(ar,` { margin-right: 0 `).concat(r,`; } body { `).concat(lh,": ").concat(s,`px; } `)},Oh=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=te(function(){return Sh(o)},[o]);return $(kh,{styles:Eh(i,!t,o,n?"":"!important")})},Wo=!1;if(typeof window<"u")try{var cr=Object.defineProperty({},"passive",{get:function(){return Wo=!0,!0}});window.addEventListener("test",cr,cr),window.removeEventListener("test",cr,cr)}catch{Wo=!1}var Vt=Wo?{passive:!1}:!1,Ph=function(e){return e.tagName==="TEXTAREA"},rc=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Ph(e)&&n[t]==="visible")},Ah=function(e){return rc(e,"overflowY")},Th=function(e){return rc(e,"overflowX")},oc=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=ic(e,n);if(r){var o=ac(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Rh=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Ih=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ic=function(e,t){return e==="v"?Ah(t):Th(t)},ac=function(e,t){return e==="v"?Rh(t):Ih(t)},Nh=function(e,t){return e==="h"&&t==="rtl"?-1:1},Dh=function(e,t,n,r,o){var i=Nh(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,c=t.contains(s),u=!1,l=a>0,f=0,p=0;do{var h=ac(e,s),m=h[0],g=h[1],b=h[2],v=g-b-i*m;(m||v)&&ic(e,s)&&(f+=v,p+=m),s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(l&&(o&&f===0||!o&&a>f)||!l&&(o&&p===0||!o&&-a>p))&&(u=!0),u},lr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},sc=function(e){return[e.deltaX,e.deltaY]},cc=function(e){return e&&"current"in e?e.current:e},Bh=function(e,t){return e[0]===t[0]&&e[1]===t[1]},zh=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} `)},Fh=0,qt=[];function Lh(e){var t=I([]),n=I([0,0]),r=I(),o=M(Fh++)[0],i=M(function(){return nc()})[0],a=I(e);P(function(){a.current=e},[e]),P(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=sh([e.lockRef.current],(e.shards||[]).map(cc),!0).filter(Boolean);return g.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=X(function(g,b){if("touches"in g&&g.touches.length===2)return!a.current.allowPinchZoom;var v=lr(g),y=n.current,w="deltaX"in g?g.deltaX:y[0]-v[0],C="deltaY"in g?g.deltaY:y[1]-v[1],T,B=g.target,A=Math.abs(w)>Math.abs(C)?"h":"v";if("touches"in g&&A==="h"&&B.type==="range")return!1;var E=oc(A,B);if(!E)return!0;if(E?T=A:(T=A==="v"?"h":"v",E=oc(A,B)),!E)return!1;if(!r.current&&"changedTouches"in g&&(w||C)&&(r.current=T),!T)return!0;var K=r.current||T;return Dh(K,b,g,K==="h"?w:C,!0)},[]),c=X(function(g){var b=g;if(!(!qt.length||qt[qt.length-1]!==i)){var v="deltaY"in b?sc(b):lr(b),y=t.current.filter(function(T){return T.name===b.type&&T.target===b.target&&Bh(T.delta,v)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var w=(a.current.shards||[]).map(cc).filter(Boolean).filter(function(T){return T.contains(b.target)}),C=w.length>0?s(b,w[0]):!a.current.noIsolation;C&&b.cancelable&&b.preventDefault()}}},[]),u=X(function(g,b,v,y){var w={name:g,delta:b,target:v,should:y};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(C){return C!==w})},1)},[]),l=X(function(g){n.current=lr(g),r.current=void 0},[]),f=X(function(g){u(g.type,sc(g),g.target,s(g,e.lockRef.current))},[]),p=X(function(g){u(g.type,lr(g),g.target,s(g,e.lockRef.current))},[]);P(function(){return qt.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Vt),document.addEventListener("touchmove",c,Vt),document.addEventListener("touchstart",l,Vt),function(){qt=qt.filter(function(g){return g!==i}),document.removeEventListener("wheel",c,Vt),document.removeEventListener("touchmove",c,Vt),document.removeEventListener("touchstart",l,Vt)}},[]);var h=e.removeScrollBar,m=e.inert;return $(Y,null,m?$(i,{styles:zh(o)}):null,h?$(Oh,{gapMode:"margin"}):null)}const Mh=gh(ec,Lh);var lc=O(function(e,t){return $(sr,qe({},e,{ref:t,sideCar:Mh}))});lc.classNames=sr.classNames;const Wh=lc;var Hh=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Kt=new WeakMap,ur=new WeakMap,dr={},Ho=0,uc=function(e){return e&&(e.host||uc(e.parentNode))},jh=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=uc(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Uh=function(e,t,n,r){var o=jh(t,Array.isArray(e)?e:[e]);dr[n]||(dr[n]=new WeakMap);var i=dr[n],a=[],s=new Set,c=new Set(o),u=function(f){!f||s.has(f)||(s.add(f),u(f.parentNode))};o.forEach(u);var l=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))l(p);else{var h=p.getAttribute(r),m=h!==null&&h!=="false",g=(Kt.get(p)||0)+1,b=(i.get(p)||0)+1;Kt.set(p,g),i.set(p,b),a.push(p),g===1&&m&&ur.set(p,!0),b===1&&p.setAttribute(n,"true"),m||p.setAttribute(r,"true")}})};return l(t),s.clear(),Ho++,function(){a.forEach(function(f){var p=Kt.get(f)-1,h=i.get(f)-1;Kt.set(f,p),i.set(f,h),p||(ur.has(f)||f.removeAttribute(r),ur.delete(f)),h||f.removeAttribute(n)}),Ho--,Ho||(Kt=new WeakMap,Kt=new WeakMap,ur=new WeakMap,dr={})}},Vh=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||Hh(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Uh(r,o,n,"aria-hidden")):function(){return null}};const dc="Dialog",[fc,Qb]=Ws(dc),[qh,Le]=fc(dc),Kh=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=I(null),c=I(null),[u=!1,l]=Hs({prop:r,defaultProp:o,onChange:i});return $(qh,{scope:t,triggerRef:s,contentRef:c,contentId:Io(),titleId:Io(),descriptionId:Io(),open:u,onOpenChange:l,onOpenToggle:X(()=>l(f=>!f),[l]),modal:a},n)},Xh="DialogTrigger",Gh=O((e,t)=>{const{__scopeDialog:n,...r}=e,o=Le(Xh,n),i=Et(t,o.triggerRef);return $(dt.button,F({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Uo(o.open)},r,{ref:i,onClick:Ve(e.onClick,o.onOpenToggle)}))}),pc="DialogPortal",[Jh,hc]=fc(pc,{forceMount:void 0}),Zh=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Le(pc,t);return $(Jh,{scope:t,forceMount:n},$e.map(r,a=>$(_n,{present:n||i.open},$(rh,{asChild:!0,container:o},a))))},jo="DialogOverlay",Yh=O((e,t)=>{const n=hc(jo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Le(jo,e.__scopeDialog);return i.modal?$(_n,{present:r||i.open},$(Qh,F({},o,{ref:t}))):null}),Qh=O((e,t)=>{const{__scopeDialog:n,...r}=e,o=Le(jo,n);return $(Wh,{as:rr,allowPinchZoom:!0,shards:[o.contentRef]},$(dt.div,F({"data-state":Uo(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),wn="DialogContent",em=O((e,t)=>{const n=hc(wn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Le(wn,e.__scopeDialog);return $(_n,{present:r||i.open},i.modal?$(tm,F({},o,{ref:t})):$(nm,F({},o,{ref:t})))}),tm=O((e,t)=>{const n=Le(wn,e.__scopeDialog),r=I(null),o=Et(t,n.contentRef,r);return P(()=>{const i=r.current;if(i)return Vh(i)},[]),$(mc,F({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ve(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ve(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ve(e.onFocusOutside,i=>i.preventDefault())}))}),nm=O((e,t)=>{const n=Le(wn,e.__scopeDialog),r=I(!1);return $(mc,F({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i;if((i=e.onCloseAutoFocus)===null||i===void 0||i.call(e,o),!o.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}r.current=!1},onInteractOutside:o=>{var i,a;(i=e.onInteractOutside)===null||i===void 0||i.call(e,o),o.defaultPrevented||(r.current=!0);const s=o.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(s))&&o.preventDefault()}}))}),mc=O((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=Le(wn,n),c=I(null),u=Et(t,c);return ah(),$(Y,null,$(Jp,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},$(Kp,F({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Uo(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),rm="DialogTitle",om=O((e,t)=>{const{__scopeDialog:n,...r}=e,o=Le(rm,n);return $(dt.h2,F({id:o.titleId},r,{ref:t}))}),im="DialogDescription",am=O((e,t)=>{const{__scopeDialog:n,...r}=e,o=Le(im,n);return $(dt.p,F({id:o.descriptionId},r,{ref:t}))}),sm="DialogClose",cm=O((e,t)=>{const{__scopeDialog:n,...r}=e,o=Le(sm,n);return $(dt.button,F({type:"button"},r,{ref:t,onClick:Ve(e.onClick,()=>o.onOpenChange(!1))}))});function Uo(e){return e?"open":"closed"}const lm=Kh,um=Gh,dm=Zh,fm=Yh,pm=em,hm=om,mm=am,gm=cm,gc={backgroundColor:"$blackAlpha600"};z("div",gc);const bc={paddingX:"$4",paddingY:"$6",borderRadius:"$sm",backgroundColor:"$white",boxShadow:"$base"},xn=z("div",bc),bm=z(fm,gc,{position:"fixed",top:0,right:0,bottom:0,left:0}),vm=z(pm,bc,{position:"fixed",top:"50%",left:"50%",minWidth:"200px",maxHeight:"85vh",padding:"$4",transform:"translate(-50%, -50%)","&:focus":{outline:"none"}}),$m=z(gm,{...Yn,right:"$4",position:"absolute",minWidth:"32px",height:"32px",padding:0,fontSize:"$md",borderRadius:"$sm",backgroundColor:"$transparent","&:hover":{backgroundColor:"$blackAlpha100"},"&:active":{backgroundColor:"$blackAlpha200"}}),fr={Root:lm,Trigger:um,Portal:dm,Overlay:bm,Content:vm,Title:hm,Description:mm,Close:$m},ym=Ce({zIndex:"$max"}),_m=Ce({zIndex:"$max",size:"$full",minWidth:"320px",maxHeight:"100%",padding:0,borderRadius:0,backgroundColor:"$gray100",overflow:"hidden","@md":{maxWidth:ql,maxHeight:Kl,borderRadius:"$sm"}});function wm(e){const{children:t,container:n,onClose:r}=e;function o(i){i.stopPropagation()}return d(fr.Root,{open:!0,modal:!0,children:d(fr.Portal,{container:n,children:[d(fr.Overlay,{css:ym}),d(fr.Content,{onWheel:o,onEscapeKeyDown:r,css:_m,children:[t,d(Ap,{position:"bottom-left",autoClose:1e4})]})]})})}function cv(e){return e}function Ke(){const e="(max-width: 480px)",t="(max-width: 768px)";function n(r){return window.matchMedia(r).matches}return n(e)?"mobile":n(t)?"tablet":"desktop"}const ft=e=>e.slice(0,2)==="G-"?"ga4":"ga";function xm(e){try{if(typeof e!="object")throw new Error("options must be an object");const{id:t,name:n,cookieDomain:r}=e??{};if(typeof t!="string"||!t.length)throw new Error("id cannot be falsy");if(typeof n!="string"||!n.length)throw new Error("name cannot be falsy");if(typeof r!="string"||!r.length)throw new Error("cookieDomain cannot be falsy");if(e.type==="ga4"){if(typeof window.gtag>"u"){const o=document.createElement("script");o.async=!0,o.src=`https://www.googletagmanager.com/gtag/js?id=${t}`,document.body.appendChild(o),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)}}window.gtag("js",new Date),window.gtag("config",t,{send_page_view:!1})}else e.type==="ga"&&(typeof window.ga>"u"&&Cm(window,document,"script","https://www.google-analytics.com/analytics.js","ga"),window.ga("create",t,{name:n,cookieDomain:r}))}catch(t){t instanceof Error&&de(()=>{tt(t.message,"ga.register")})}}function At({method:e="ga",eventCategory:t,eventAction:n,eventLabel:r,value:o=0}){try{const i=window.dataLayer,a=window.tracking,s=window.ga,c=window.gtag;if(e==="dataLayer"){if(!Array.isArray(i))throw new Error("window.dataLayer not found");i.push({event:"gaEvent",eventAction:n,eventCategory:t,eventLabel:r,value:o})}else if(e==="tracking"){if(typeof a>"u")throw new Error("window.tracking not found");a("recipe2basket.send","event",{eventAction:n,eventCategory:t,eventLabel:r,value:o})}else if(e==="ga"){if(typeof s>"u")throw new Error("window.ga not found");s("recipe2basket.send","event",{eventAction:n,eventCategory:t,eventLabel:r,eventValue:o})}else if(e==="ga4"){if(typeof c>"u")throw new Error("window.gtag not found");c("event",n,{event_action:n,event_section:t,event_description:r,event_value:o})}return!0}catch(i){return i instanceof Error&&de(()=>{tt(i.message,"ga.send")}),!1}}function Cm(e,t,n,r,o,i,a){e.GoogleAnalyticsObject=o,e[o]=e[o]||function(){(e[o].q=e[o].q||[]).push(arguments)},e[o].l=1*new Date,i=t.createElement(n),a=t.getElementsByTagName(n)[0],i.async=1,i.src=r,a.parentNode.insertBefore(i,a)}const Sm=()=>{const e=new URLSearchParams(window.location.search);return{utmSource:e.get("utm_source")||void 0,utmMedium:e.get("utm_medium")||void 0,utmCampaign:e.get("utm_campaign")||void 0,utmContent:e.get("utm_content")||void 0,utmTerm:e.get("utm_term")||void 0}};async function Cn(e,t={}){const{signal:n}=t,r=Sm(),o={...e,...Object.fromEntries(Object.entries(r).filter(([,c])=>c!=null))},{data:i,error:a}=await Lt(ln.post("/event",o,{...n?{signal:n}:{}}));return!!(!(i!=null&&i.status.toString().startsWith("2"))||a)}function km(e,t){return Cn({event:"button-opened",...e},t)}function Em(e,t){return Cn({event:"supermarket-not-found",...e},t)}function vc(e,t){return Cn({event:"supermarket-click",...e},t)}function pr(e,t){return Cn({event:"dismiss-click",...e},t)}function $c(e,t){return Cn({event:"buy-click",...e},t)}function Om(e){const{headerText:t,headingText:n,subheadingText:r,buttonText:o,utmCampaign:i,utmSource:a,onClick:s,onClose:c}=e;return d(H,{direction:"column",css:{size:"$full"},children:[d(St,{children:[d(kt,{children:t}),d(Se,{icon:d(N,{as:je}),onClick:c,css:{ml:"auto"}})]}),d(He,{maxWidth:"sm",css:{m:"auto",ta:"center"},children:[d(le,{children:n}),d(R,{css:{my:"$4"},children:r}),d(Pe,{colorScheme:"primary",onClick:s,css:{w:"$full",bxsh:"$base"},children:o}),d(re,{css:{mt:"$6"},children:d(R,{size:"sm",children:["Se o erro persistir, tente atualizar a página ou entre em contato pelo e-mail"," ",d(Oe,{size:"sm",href:`mailto:${Ln}`,children:Ln}),"."]})})]}),d(As,{utmCampaign:i,utmSource:a})]})}function yc(e){const{onClickCloseBtn:t,onClickCheckoutBtn:n,checkoutUrl:r,isFetchingCheckoutUrl:o,disabledCheckoutBtn:i}=e;return d(re,{css:{pos:"relative",fxsh:0,mt:"auto",ta:"center",bgc:"$white",bxsh:"$-md"},children:d(He,{maxWidth:"ch",css:{p:"$4 $6"},children:[d(H,{gap:2,align:"center",children:[d(Pe,{variant:"ghost",onClick:t,css:{fx:"1 0"},children:"Sair"}),d(Pe,{as:Oe,href:r,variant:"solid",colorScheme:"primary",onClick:n,disabled:i,css:{fx:"1 0",td:"none","&:active, &:hover":{c:"$white"},...i?{"&:active, &:hover":{c:"$white"},"&:disabled, &[disabled]":{op:.4,bxsh:"none",cursor:"not-allowed",pointerEvents:"none"}}:{}},children:o?d($p,{}):"Continuar"})]}),d(R,{size:"xs",css:{mt:"$4"},children:'Ao "Continuar" iremos adicionar os produtos acima ao carrinho do varejista escolhido. Você poderá decidir mais tarde se quer concluir a compra.'})]})})}function Vo(e="pt-BR",t="BRL"){return new Intl.NumberFormat(e,{minimumFractionDigits:2,style:"currency",currency:t}).format}const Pm=Vo();function _c(e){const{cartPrice:t,productsQuantity:n}=e;return d(re,{css:{p:"$6",bgc:"$gray200",bdrs:"$sm"},children:[d(R,{size:"lg",css:{ta:"center",fontWeight:"$semibold",mb:"$4"},children:"Seu carrinho"}),d(H,{justify:"between",align:"center",children:[d(R,{asChild:!0,css:{lineHeight:"$shorter"},children:d("span",{children:["Você tem ",n," ",n>1?"produtos":"produto"," em seu carrinho."]})}),d(R,{asChild:!0,size:"xl",css:{ml:"$6",fontWeight:"$bold"},children:d("strong",{children:Pm(t)})})]})]})}function qo(e){const{children:t,css:n={}}=e,r=Ce({size:"$full",jc:"center",ta:"center",...n});return d(He,{centerContent:!0,maxWidth:"sm",css:r,children:t})}const hr=z("ul",{margin:0,padding:0,listStyle:"none"}),Sn=z("li",{}),Am=z("div",{display:"flex",alignItems:"center",justifyContent:"center"}),Tt=z("img",{display:"block",maxWidth:"100%",height:"auto",borderStyle:"none"}),mr=Vo();function wc(e){const{active:t,imageUrl:n,name:r,price:o,count:i,swap:a,onRemove:s,onAdd:c,onActivate:u,onInactivate:l,onOpenSwapper:f}=e,[p,h]=M(!1);return t?d(Y,{children:d(Sn,{css:{d:"flex",ai:"center",w:"$full",mih:"130px",pos:"relative",p:"$4",bdrs:"$sm",bgc:"$white",us:"none",bxsh:"$base"},children:[d(Ue,{size:"sm",variant:"ghost",colorScheme:"gray","aria-label":"Remove ingredient",onClick:l,rounded:!0,css:{pos:"absolute",t:0,l:0,trf:"translate(-5px, -5px)",c:"$gray700",bdrs:"none",bxsh:"$md",bgc:"$white"},children:d(N,{as:Ds})}),!!(a!=null&&a.length)&&d(Ue,{size:"sm",variant:"ghost",colorScheme:"gray","aria-label":"Change by similar product",onClick:f,rounded:!0,css:{pos:"absolute",t:0,r:0,trf:"translate(5px, -5px)",c:"$gray700",bdrs:"none",bxsh:"$md",bgc:"$white"},children:d(N,{as:fp})}),d(H,{align:"center",css:{width:"$full"},children:[p?d(N,{as:er,css:{size:"48px",miw:"48px",objectFit:"contain",pe:"none",mr:"$4",c:"#E3E9ED"}}):d(Tt,{src:n,loading:"lazy",onLoad:()=>h(!1),onError:()=>h(!0),css:{size:"48px",miw:"48px",objectFit:"contain",mr:"$4"}}),d(re,{css:{w:"$full"},children:[d(R,{size:"sm",css:{mb:"2",pr:"4",fw:"$semibold"},children:r}),d(H,{align:"end",justify:"between",children:[d(re,{children:[d(R,{size:"lg",css:{fw:"$semibold"},children:mr(o*i)}),d(R,{size:"sm",children:[i,"x ",mr(o)]})]}),d(H,{align:"center",css:{bdrs:"$sm",bdw:"1px",bdc:"$gray300"},children:[d(Ue,{as:"span",size:"sm",variant:"ghost",colorScheme:"gray","aria-label":"One less",onClick:s,css:{borderRightRadius:"none"},children:d(N,{as:Fs})}),d(R,{css:{px:"$3"},children:i}),d(Ue,{as:"span",size:"sm",variant:"ghost",colorScheme:"gray","aria-label":"One more",onClick:c,css:{borderRightRadius:"none"},children:d(N,{as:Ns})})]})]})]})]})]})}):d(Sn,{css:{display:"flex",alignItems:"center",minHeight:"130px",position:"relative",padding:"$4",borderRadius:"$sm",backgroundColor:"$white",userSelect:"none",boxShadow:"$base"},children:[d(Am,{css:{zIndex:"1",flexDirection:"column",alignItems:"center",position:"absolute",top:0,left:0,size:"$full",padding:"$4",borderRadius:"$md",color:"$white",backgroundColor:"$blackAlpha700",textAlign:"center"},children:d(re,{children:[d(R,{size:"md",css:{mb:"$4",fontWeight:"$semibold",color:"currentColor"},children:"Ingrediente removido"}),d(Pe,{size:"sm",colorScheme:"blue",onClick:u,css:{"&:disabled, &[disabled]":{opacity:1,cursor:"not-allowed",pointerEvents:"none"}},children:"Adicionar novamente"})]})}),d(H,{align:"center",tabIndex:-1,"aria-hidden":!0,css:{width:"$full",filter:"blur(1px)",pointerEvents:"none"},children:[p?d(N,{as:er,css:{size:"48px",minWidth:"48px",objectFit:"contain",pointerEvents:"none",mr:"$4",c:"#E3E9ED"}}):d(Tt,{src:n,loading:"lazy",onLoad:()=>h(!1),onError:()=>h(!0),css:{size:"64px",minWidth:"64px",objectFit:"contain",mr:"$4"}}),d(re,{css:{width:"$full"},children:[d(R,{size:"sm",css:{mb:"$2",pr:"$4",fontWeight:"$semibold"},children:r}),d(H,{align:"center",justify:"between",children:[d(re,{children:[d(R,{size:"lg",css:{fontWeight:"$semibold"},children:mr(o*i)}),d(R,{size:"sm",children:[i,"x ",mr(o)]})]}),d(H,{align:"center",css:{borderRadius:"$md",borderWidth:"1px",borderColor:"$gray200"},children:[d(Ue,{as:"span",size:"sm",variant:"ghost",colorScheme:"gray","aria-label":"One less",css:{borderRightRadius:"none"},children:d(N,{as:Fs})}),d(R,{css:{px:"$3"},children:i}),d(Ue,{as:"span",size:"sm",variant:"ghost",colorScheme:"gray","aria-label":"One more",css:{borderRightRadius:"none"},children:d(N,{as:Ns})})]})]})]})]})]})}function xc(e){const{onDecrementProduct:t,onIncrementProduct:n,onToggleActive:r,onOpenSwapper:o,list:i}=e,a=i.length;return d(Y,{children:[d(le,{size:"md",css:{mb:"$2"},children:"Ingredientes encontrados"}),d(R,{css:{mb:"$6"},children:["Foram encontrados ",a," ingredientes da receita:"]}),d(hr,{css:{"& > * + *":{mt:"$6"}},children:i.sort((s,c)=>Number(c.isBranded)-Number(s.isBranded)).map(s=>d(wc,{active:s._active,imageUrl:s.imageFile,name:s.name,price:s.price,count:s.count,swap:s.swap,onRemove:()=>t(s),onAdd:()=>n(s),onActivate:()=>r(s,!0),onInactivate:()=>r(s,!1),onOpenSwapper:()=>o(s)},s._id))})]})}function Cc(e){const{list:t}=e;return d(Y,{children:[d(le,{size:"md",css:{mb:"$2"},children:"Ingredientes não encontrados"}),d(R,{css:{mb:"$6"},children:"Infelizmente, não conseguimos encontrar os seguintes ingredientes:"}),d(hr,{css:{"& > * + *":{mt:"$4"}},children:t.map(n=>d(Sn,{css:{d:"flex",ai:"center",mih:"60px",p:"$4",bdrs:"$sm",bgc:"$white",bxsh:"$base"},children:d(R,{children:n})},n))})]})}function Sc(e){const{onDecrementProduct:t,onIncrementProduct:n,onToggleActive:r,onOpenSwapper:o,list:i}=e;return d(Y,{children:[d(le,{size:"md",css:{mb:"$2"},children:"Ingredientes removidos"}),d(R,{css:{mb:"$6"},children:"Tiramos do seu carrinho os ingredientes que você provavelmente já possui, se preferir, selecione-os abaixo para incluí-los novamente."}),d(hr,{css:{"& > * + *":{mt:"$6"}},children:i.map(a=>d(wc,{active:a._active,imageUrl:a.imageFile,name:a.name,price:a.price,count:a.count,swap:a.swap,onRemove:()=>t(a),onAdd:()=>n(a),onActivate:()=>r(a,!0),onInactivate:()=>r(a,!1),onOpenSwapper:()=>o(a)},a._id))})]})}function Tm(e){const t=I({value:e,previous:e});return te(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Rm(e){const[t,n]=M(void 0);return nr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Ko=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=O((r,o)=>{const{asChild:i,...a}=r,s=i?rr:t;return P(()=>{window[Symbol.for("radix-ui")]=!0},[]),$(s,F({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),kc="Checkbox",[Im,uv]=Ws(kc),[Nm,Dm]=Im(kc),Bm=O((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,...l}=e,[f,p]=M(null),h=Et(t,w=>p(w)),m=I(!1),g=f?!!f.closest("form"):!0,[b=!1,v]=Hs({prop:o,defaultProp:i,onChange:u}),y=I(b);return P(()=>{const w=f==null?void 0:f.form;if(w){const C=()=>v(y.current);return w.addEventListener("reset",C),()=>w.removeEventListener("reset",C)}},[f,v]),$(Nm,{scope:n,state:b,disabled:s},$(Ko.button,F({type:"button",role:"checkbox","aria-checked":Rt(b)?"mixed":b,"aria-required":a,"data-state":Ec(b),"data-disabled":s?"":void 0,disabled:s,value:c},l,{ref:h,onKeyDown:Ve(e.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Ve(e.onClick,w=>{v(C=>Rt(C)?!0:!C),g&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})})),g&&$(Lm,{control:f,bubbles:!m.current,name:r,value:c,checked:b,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),zm="CheckboxIndicator",Fm=O((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=Dm(zm,n);return $(_n,{present:r||Rt(i.state)||i.state===!0},$(Ko.span,F({"data-state":Ec(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),Lm=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=I(null),a=Tm(n),s=Rm(t);return P(()=>{const c=i.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&f){const p=new Event("click",{bubbles:r});c.indeterminate=Rt(n),f.call(c,Rt(n)?!1:n),c.dispatchEvent(p)}},[a,n,r]),$("input",F({type:"checkbox","aria-hidden":!0,defaultChecked:Rt(n)?!1:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Rt(e){return e==="indeterminate"}function Ec(e){return Rt(e)?"indeterminate":e?"checked":"unchecked"}const Mm=Bm,Wm=Fm,Hm=z(Mm,{all:"unset",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:"20px",height:"20px",margin:0,padding:0,lineHeight:1,outline:"none",border:"1px solid $gray300",borderRadius:"$sm",backgroundColor:"$white",boxShadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.14)","-webkit-tap-highlight-color":"rgba(0,0,0,0)",appearance:"none",overflow:"hidden",cursor:"pointer","&:hover":{backgroundColor:"$gray100",boxShadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.24)"}}),jm=z(Wm,{color:"$blue800"}),Oc=Vo();function Pc(e){var c;const{product:t,onClose:n,onChange:r}=e,[o,i]=M(null),[a,s]=M(!1);return d(H,{direction:"column",css:{z:"$modal",pos:"absolute",t:0,l:0,size:"$full",bgc:"$gray100"},children:[d(St,{children:[d(kt,{children:"Trocar produto"}),d(Se,{icon:d(N,{as:Ao}),onClick:n})]}),d(re,{css:{p:"$4",ovy:"auto"},children:[d(le,{size:"md",css:{mb:"$4"},children:"Atual"}),d(Sn,{as:"div",css:{display:"flex",alignItems:"center",minHeight:"100px",mb:"$6",px:"$4",py:"$2",borderRadius:"$sm",backgroundColor:"$white",boxShadow:"$base"},children:[a?d(N,{as:er,css:{size:"48px",minWidth:"48px",objectFit:"contain",pointerEvents:"none",mr:"$4",c:"#E3E9ED"}}):d(Tt,{src:t.imageFile,loading:"lazy",onLoad:()=>s(!1),onError:()=>s(!0),css:{size:"48px",minWidth:"48px",objectFit:"contain",pointerEvents:"none",mr:"$4"}}),d(re,{css:{width:"$full"},children:[d(R,{size:"sm",css:{fontWeight:"$semibold",mb:"$2"},children:t.name}),d(R,{size:"md",css:{fontWeight:"$semibold"},children:Oc(t.price)})]})]}),d(le,{size:"md",css:{mb:"$4"},children:"Similares"}),d(hr,{css:{"& > * + *":{mt:"$6"}},children:(c=t.swap)==null?void 0:c.map(u=>d(Sn,{children:d(re,{asChild:!0,className:ye((o==null?void 0:o._id)===u._id&&"checked"),css:{"--bxsh-color":"rgba(20, 122, 243, 0.6)",display:"flex",alignItems:"center",position:"relative",minHeight:"100px",borderRadius:"$sm",boxShadow:"$base",backgroundColor:"$white",px:"$4",py:"$2",cursor:"pointer","&.checked":{cursor:"auto",boxShadow:"var(--bxsh-color) 0 0 0 3px"}},children:d("label",{children:[d(Hm,{onCheckedChange:()=>i(u),checked:o?(u==null?void 0:u._id)===(o==null?void 0:o._id):!1,css:{mr:"$4",".checked &":{cursor:"auto"}},children:d(jm,{children:d(sp,{style:{height:"1em"}})})}),a?d(N,{as:er,css:{size:"48px",minWidth:"48px",objectFit:"contain",pointerEvents:"none",mr:"$4",c:"#E3E9ED"}}):d(Tt,{src:u.imageFile,loading:"lazy",onLoad:()=>s(!1),onError:()=>s(!0),css:{size:"48px",minWidth:"48px",objectFit:"contain",pointerEvents:"none",mr:"$4"}}),d(re,{css:{width:"$full"},children:[d(R,{size:"sm",css:{fontWeight:"$semibold",mb:"$2"},children:u.name}),d(R,{size:"md",css:{fontWeight:"$semibold"},children:Oc(u.price)})]})]})})},u._id))})]}),d(re,{css:{display:"flex",width:"$full",mt:"auto",padding:"$4",gap:"$4",backgroundColor:"$white",boxShadow:"$-md"},children:[d(Pe,{variant:"ghost",colorScheme:"gray",onClick:n,css:{flex:1},children:"Cancelar"}),d(Pe,{colorScheme:"blue",disabled:!o,onClick:()=>{o&&r(o),n()},css:{flex:1},children:"Confirmar"})]})]})}const Um=Ce({width:"100%",minWidth:0,position:"relative",margin:0,color:"inherit",fontFamily:"$body",fontSize:"$md",outline:"transparent solid 2px",outlineOffset:"1px",transitionDuration:"$transitions$fast",transitionProperty:"background-color, color",transitionTimingFunction:"ease-in-out",appearance:"none"}),Vm=z("input",{...Um,variants:{variant:{filled:{height:"40px",paddingInline:"$4",borderRadius:"$sm",borderWidth:"$sm",borderStyle:"solid",borderImage:"initial",borderColor:"transparent",background:"$white","&:hover":{background:"$gray100"},"&:focus-visible":{background:"transparent",borderColor:"$black",outlineColor:"transparent !important"}},flushed:{height:"40px",paddingInline:0,borderWidth:0,borderBottomStyle:"solid",borderBottomWidth:"1px",borderColor:"$gray300",background:"transparent","&:focus-visible":{borderColor:"$black",boxShadow:"$colors$black 0 1px 0 0",outlineColor:"transparent !important"}},outline:{height:"40px",paddingInline:"$4",borderRadius:"$sm",borderWidth:"1px",borderStyle:"solid",borderImage:"initial",borderColor:"$gray300",background:"inherit","&:hover":{borderColor:"$gray300"},"&:focus-visible":{zIndex:1,borderColor:"$black",boxShadow:"$colors$black 0 0 0 1px",outlineColor:"transparent !important"}}},rounded:{true:{borderRadius:"$pill"}}},compoundVariants:[{variant:"flushed",rounded:"true",css:{borderRadius:"initial"}}],defaultVariants:{variant:"outline",rounded:!1}}),Xo=O(function({onChange:t,onPressEnter:n,value:r,css:o={},...i},a){const s=()=>{n==null||n()};return $(Vm,{...i,key:"r2b-input-postal-code",ref:a,type:"text",variant:"filled",minLength:8,maxLength:8,placeholder:"________",onChange:u=>t(u.target.value),onKeyDown:({key:u})=>{const l={Enter:s};u in l&&l[u]()},value:r,css:{lts:"$widest",ta:"center",bxsh:"$base",...o}})}),Ac=({onChangePostalCode:e,postalCodeValue:t})=>d(He,{maxWidth:"sm",css:{m:"auto",ta:"center"},children:[d(le,{children:"Insira seu CEP"}),d(R,{css:{my:"$4"},children:"Selecionaremos a melhor unidade para fazer a entrega de seus produtos"}),d(Xo,{onChange:e,value:t,css:{mb:"$2",h:"36px"}}),d(re,{css:{mt:"$6"},children:[d(H,{align:"center",justify:"center",children:[d(N,{as:Qn}),d(R,{size:"xs",css:{fw:"$semibold",mis:"$1"},children:"Não sabe o seu código postal?"})]}),d(R,{size:"xs",children:["Descubra"," ",d(Oe,{size:"xs",href:Gr,children:"aqui"}),"."]})]})]});function Tc(e){const{onClose:t,title:n,text:r}=e;return d(Y,{children:[d(H,{css:{w:"$full",ai:"center",jc:"flex-end",pos:"absolute",py:"$2",px:"$3"},children:d(Ue,{variant:"ghost",colorScheme:"gray",onClick:t,children:d(N,{as:je})})}),d(qo,{children:[d(le,{children:n}),d(R,{css:{mt:"$2",mb:"$4"},children:r}),d(Mf,{color:"primary500",emptyColor:"gray200",label:"Carregando...",size:"lg",speed:"0.65s",thickness:"4px"})]})]})}function qm(e){const{postalCode:t,postalCodeRef:n,utmCampaign:r,utmSource:o,disabledPostalCodeBtn:i,onChangePostalCode:a,onOpenSettings:s,onCloseWidget:c,onSubmit:u}=e;return d(H,{direction:"column",css:{size:"$full"},children:[d(St,{children:[d(kt,{children:"Localização"}),d(Se,{icon:d(N,{as:tr}),onClick:s}),d(Se,{icon:d(N,{as:je}),onClick:c,css:{ml:"auto"}})]}),d(He,{maxWidth:"sm",css:{m:"auto",ta:"center"},children:[d(le,{children:"Não encontramos um varejista com entrega na sua região."}),d(R,{css:{my:"$4"},children:"Insira um código postal para tentar novamente:"}),d(Xo,{ref:n,onChange:a,onPressEnter:u,value:t,css:{mb:"$2"}}),d(Pe,{colorScheme:"primary",disabled:i,onClick:u,css:{w:"$full",bxsh:"$base"},children:"Continuar"}),d(re,{css:{mt:"$6"},children:[d(H,{align:"center",justify:"center",children:[d(N,{as:Qn}),d(R,{size:"sm",css:{fw:"$semibold",mis:"$1"},children:"Não sabe o seu código postal?"})]}),d(R,{size:"sm",children:["Descubra"," ",d(Oe,{size:"sm",href:Gr,children:"aqui"}),"."]})]})]}),d(As,{utmCampaign:r,utmSource:o})]})}function Km(e){const{onClickTryAgain:t,onCloseWidget:n}=e;return d(qo,{children:[d(Ue,{variant:"ghost",colorScheme:"gray",onClick:n,css:{pos:"absolute",t:"$6",r:"$6"},children:d(N,{as:je})}),d(N,{as:Bs,size:"xl",css:{c:"$red800",mb:"$4"}}),d(le,{css:{w:"$full",mb:"$2"},children:"Ocorreu um erro inesperado."}),d(R,{children:"Mas você pode tentar novamente pressionando uns dos botões abaixo."}),d(H,{css:{w:"$full",gap:"$4",my:"$6"},children:[d(Pe,{onClick:n,variant:"ghost",css:{fx:"1 0"},children:"Sair"}),d(Pe,{onClick:t,colorScheme:"blue",css:{fx:"1 0"},children:"Tentar novamente"})]}),d(R,{size:"xs",children:["Se o erro persistir, tente sair e abrir novamente, ou, se preferir, entre em contato conosco pelo e-mail"," ",d(Oe,{size:"xs",href:`mailto:${Ln}`,children:Ln}),"."]})]})}const Xm=O(function(t,n){const{onClickBackBtn:r,onClickSettingsBtn:o,onCloseWidget:i,onChangePostalCode:a,onSubmitPostalCode:s,showBackBtn:c,disabledBackBtn:u,isValidPostalCode:l,postalCodeValue:f}=t;return d(H,{direction:"column",css:{size:"$full"},children:[d(St,{children:[d(kt,{children:"Localização"}),d(ep,{children:[c&&d(Se,{tabIndex:u?-1:0,icon:d(N,{as:Ao}),onClick:r,css:{op:u?.6:void 0,pe:u?"none":void 0}}),d(Se,{icon:d(N,{as:tr}),onClick:o})]}),d(Se,{icon:d(N,{as:je}),onClick:i})]}),d(He,{maxWidth:"sm",css:{m:"auto",ta:"center"},children:[d(le,{children:"Descubra varejistas com entrega na sua região"}),d(R,{css:{my:"$4"},children:"Insira seu código postal para continuar"}),d(Xo,{ref:n,onChange:a,onPressEnter:s,value:f,css:{mb:"$2"}}),d(Pe,{colorScheme:"primary",disabled:!l,onClick:s,css:{w:"$full",bxsh:"$base"},children:"Continuar"}),d(re,{css:{mt:"$6"},children:[d(H,{align:"center",justify:"center",children:[d(N,{as:Qn}),d(R,{size:"sm",css:{fw:"$semibold",mis:"$1"},children:"Não sabe o seu código postal?"})]}),d(R,{size:"sm",children:["Descubra"," ",d(Oe,{size:"sm",href:Gr,children:"aqui"}),"."]})]})]})]})}),Go="horizontal",Gm=["horizontal","vertical"],Rc=O((e,t)=>{const{decorative:n,orientation:r=Go,...o}=e,i=Ic(r)?r:Go,s=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return $(Ko.div,F({"data-orientation":i},s,o,{ref:t}))});Rc.propTypes={orientation(e,t,n){const r=e[t],o=String(r);return r&&!Ic(r)?new Error(Jm(o,n)):null}};function Jm(e,t){return`Invalid prop \`orientation\` of value \`${e}\` supplied to \`${t}\`, expected one of: - horizontal - vertical Defaulting to \`${Go}\`.`}function Ic(e){return Gm.includes(e)}const kn=z(Rc,{flexShrink:0,margin:0,border:"none",backgroundColor:"#dfe3e6",cursor:"default",variants:{size:{xs:{'&[data-orientation="horizontal"]':{height:"1px",width:"16px"},'&[data-orientation="vertical"]':{width:"1px",height:"16px"}},sm:{'&[data-orientation="horizontal"]':{height:"1px",width:"32px"},'&[data-orientation="vertical"]':{width:"1px",height:"32px"}},md:{'&[data-orientation="horizontal"]':{height:"1px",width:"64px"},'&[data-orientation="vertical"]':{width:"1px",height:"64px"}},lg:{'&[data-orientation="horizontal"]':{height:"1px",width:"128px"},'&[data-orientation="vertical"]':{width:"1px",height:"128px"}},fill:{'&[data-orientation="horizontal"]':{height:"1px",width:"100%"},'&[data-orientation="vertical"]':{width:"1px",height:"100%"}}}},defaultVariants:{size:"md"}});function Zm(e){const{onClickCloseBtn:t,onClickSettingsBtn:n,onClickCheckoutBtn:r,onClickLocationBtn:o,onDecrementProduct:i,onIncrementProduct:a,onToggleActive:s,onCloseSwapper:c,onOpenSwapper:u,onSwapProduct:l,onChangePostalCode:f,postalCodeValue:p,open:h,isSwapperOpen:m,swapperProduct:g,checkoutUrl:b,isFetchingCheckoutUrl:v,disabledCheckoutBtn:y,locationLabel:w,cartPrice:C,active:T}=e,B=I(null),A=I(null),[E,K]=T.products.reduce(([ge,pe],Z)=>Z.common?[ge,[...pe,Z]]:[[...ge,Z],pe],[[],[]]),J=T.ingredientsNotFound,ie=T.products.filter(ge=>ge._active).reduce((ge,pe)=>ge+pe.count,0),fe=d(kn,{css:{my:"$6",mx:"auto",bdc:"$gray300"}});return d(H,{ref:B,direction:"column",css:{z:1,pos:"relative",size:"$full"},children:[d(St,{children:[d(kt,{children:"Varejista encontrado"}),d(Se,{icon:d(N,{as:tr}),onClick:n}),d(Se,{icon:d(N,{as:je}),onClick:t})]}),d(Ts,{children:d(Rs,{icon:d(N,{as:To}),label:w,onClick:o})}),d(He,{maxWidth:"ch",asChild:!0,css:{p:"$6"},ref:A,children:d(H,{direction:"column",css:{fxg:1,fxb:"1px",ovy:"auto"},children:[!h&&d(Y,{children:[d(R,{css:{ta:"center",mb:"$4"},children:T.name}),d(Tt,{src:T.urlLogo,alt:`Varejista: ${T.name}`,css:{fxsh:0,size:"60px !important",maw:"60px",miw:"60px",mx:"auto",op:1,bgc:"$white",objectFit:"contain",p:"4px",bdw:"3px",bdc:"$primary500",bds:"solid",bdrs:"$round",ov:"hidden"}}),fe,d(xc,{onDecrementProduct:i,onIncrementProduct:a,onToggleActive:s,onOpenSwapper:u,list:E}),!!K.length&&d(Y,{children:[fe,d(Sc,{onDecrementProduct:i,onIncrementProduct:a,onToggleActive:s,onOpenSwapper:u,list:K})]}),!!J.length&&d(Y,{children:[fe,d(Cc,{list:J})]}),fe,d(_c,{cartPrice:C,productsQuantity:ie})]}),h&&d(Ac,{onChangePostalCode:f,postalCodeValue:p})]})}),d(yc,{onClickCloseBtn:t,onClickCheckoutBtn:r,checkoutUrl:b,isFetchingCheckoutUrl:v,disabledCheckoutBtn:y}),m&&!!g&&d(Pc,{product:g,onChange:l,onClose:c})]})}function Ym(e){const{onClickCloseBtn:t,onClickSettingsBtn:n,onClickCheckoutBtn:r,onClickLocationBtn:o,onDecrementProduct:i,onIncrementProduct:a,onToggleActive:s,onCloseSwapper:c,onOpenSwapper:u,onSwapProduct:l,onChangePostalCode:f,open:p,postalCodeValue:h,isSwapperOpen:m,swapperProduct:g,checkoutUrl:b,isFetchingCheckoutUrl:v,disabledCheckoutBtn:y,slideTrackWidth:w,locationLabel:C,cartPrice:T,active:B,list:A}=e,E=I(null),K=I(null),[J,ie]=B.products.reduce(([Z,Je],ke)=>ke.common?[Z,[...Je,ke]]:[[...Z,ke],Je],[[],[]]),fe=B.ingredientsNotFound,ge=B.products.filter(Z=>Z._active).reduce((Z,Je)=>Z+Je.count,0),pe=d(kn,{css:{my:"$6",mx:"auto",bdc:"$gray300"}});return d(H,{ref:E,direction:"column",css:{z:1,pos:"relative",size:"$full"},children:[d(St,{children:[d(kt,{children:"Varejistas encontrados"}),d(Se,{icon:d(N,{as:tr}),onClick:n}),d(Se,{icon:d(N,{as:je}),onClick:t})]}),d(Ts,{children:d(Rs,{icon:d(N,{as:To}),label:C,onClick:o})}),d(He,{ref:K,maxWidth:"ch",asChild:!0,css:{p:"$6"},children:d(H,{direction:"column",css:{fxg:1,fxb:"1px",ovy:"auto"},children:[!p&&d(Y,{children:[d(R,{css:{ta:"center",mb:"$4"},children:B.name}),d(re,{className:"glide",css:{d:"flex",ai:"center",jc:"space-between",gap:"$4",py:"$4",...v?{opacity:.6,pointerEvents:"none"}:{}},children:[d("div",{className:"glide__arrows","data-glide-el":"controls",children:d(re,{className:"glide__arrow glide__arrow--left","data-glide-dir":"<",css:{d:"flex",ai:"center",jc:"center",size:"28px",p:"$2",lh:1,bdrs:"$pill",c:"$black",bgc:"$white",bxsh:"$base",trs:"box-shadow 0.3s ease","&:hover":{bxsh:"$md"}},children:d(N,{size:"sm",as:zs,css:{trf:"rotate(90deg)"}})})}),d(re,{"data-glide-el":"track",className:"glide__track",css:{fxb:w,w},children:d("ul",{className:"glide__slides",children:A.map(Z=>d(re,{asChild:!0,tabIndex:0,role:"button","data-retailer-index":Z._index,css:{size:"60px",fxsh:0,"&.glide__slide--active .retailer__image":{op:1,p:"4px",bdw:"3px",bdc:"$primary500",trf:"none"}},children:d("li",{className:"glide__slide",children:d(Tt,{src:Z.urlLogo,alt:`Varejista: ${Z.name}`,className:"retailer__image",css:{fxsh:0,size:"60px !important",maw:"60px",miw:"60px",mx:"auto",op:.6,bgc:"$white",objectFit:"contain",p:"3px",bdw:"2px",bdc:"$gray300",bds:"solid",bdrs:"$round",trf:"scale(0.85)",trs:"transform 0.3s ease, opacity 0.3s ease",willChange:"transform, opacity, filter",pe:"none",ov:"hidden"}})})},Z._id))})}),d("div",{className:"glide__arrows","data-glide-el":"controls",children:d(re,{className:"glide__arrow glide__arrow--right","data-glide-dir":">",css:{d:"flex",ai:"center",jc:"center",size:"28px",p:"$2",lh:1,bdrs:"$pill",c:"$black",bgc:"$white",bxsh:"$base",trs:"box-shadow 0.3s ease","&:hover":{bxsh:"$md"}},children:d(N,{size:"sm",as:zs,css:{trf:"rotate(-90deg)"}})})})]}),pe,d(xc,{onDecrementProduct:i,onIncrementProduct:a,onToggleActive:s,onOpenSwapper:u,list:J}),!!ie.length&&d(Y,{children:[pe,d(Sc,{onDecrementProduct:i,onIncrementProduct:a,onToggleActive:s,onOpenSwapper:u,list:ie})]}),!!fe.length&&d(Y,{children:[pe,d(Cc,{list:fe})]}),pe,d(_c,{cartPrice:T,productsQuantity:ge})]}),p&&d(Ac,{onChangePostalCode:f,postalCodeValue:h})]})}),d(yc,{onClickCloseBtn:t,onClickCheckoutBtn:r,checkoutUrl:b,isFetchingCheckoutUrl:v,disabledCheckoutBtn:y}),m&&!!g&&d(Pc,{product:g,onChange:l,onClose:c})]})}const Qm=z("div",{display:"flex",variants:{direction:{row:{flexDirection:"row"},column:{flexDirection:"column"},rowReverse:{flexDirection:"row-reverse"},columnReverse:{flexDirection:"column-reverse"}},align:{start:{alignItems:"flex-start"},center:{alignItems:"center"},end:{alignItems:"flex-end"},stretch:{alignItems:"stretch"},baseline:{alignItems:"baseline"}},justify:{start:{justifyContent:"flex-start"},center:{justifyContent:"center"},end:{justifyContent:"flex-end"},between:{justifyContent:"space-between"}},wrap:{noWrap:{flexWrap:"nowrap"},wrap:{flexWrap:"wrap"},wrapReverse:{flexWrap:"wrap-reverse"}},shrink:{true:{flexShrink:1},false:{flexShrink:0}},gap:{0:{gap:0},1:{gap:"$1"},2:{gap:"$2"},3:{gap:"$3"},4:{gap:"$4"},5:{gap:"$5"},6:{gap:"$6"},7:{gap:"$7"},8:{gap:"$8"},9:{gap:"$9"},10:{gap:"$10"},12:{gap:"$12"},14:{gap:"$14"},16:{gap:"$16"}}},defaultVariants:{direction:"row",align:"stretch",justify:"start",wrap:"noWrap",shrink:"false",gap:0}}),Nc=z(Qm,{defaultVariants:{direction:"column",gap:4}});z(Nc,{defaultVariants:{direction:"row"}});const Dc=z(Nc,{});function Xe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function gr(e,t=[]){let n=[];function r(i,a){const s=ue(a),c=n.length;n=[...n,a];function u(f){const{scope:p,children:h,...m}=f,g=(p==null?void 0:p[e][c])||s,b=te(()=>m,Object.values(m));return $(g.Provider,{value:b},h)}function l(f,p){const h=(p==null?void 0:p[e][c])||s,m=me(h);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,l]}const o=()=>{const i=n.map(a=>ue(a));return function(s){const c=(s==null?void 0:s[e])||i;return te(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,eg(o,...t)]}function eg(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:c,scopeName:u})=>{const f=c(i)[`__scope${u}`];return{...s,...f}},{});return te(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Jo(e){const t=I(e);return P(()=>{t.current=e}),te(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Zo({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=tg({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Jo(n),c=X(u=>{if(i){const f=typeof u=="function"?u(e):u;f!==e&&s(f)}else o(u)},[i,e,o,s]);return[a,c]}function tg({defaultProp:e,onChange:t}){const n=M(e),[r]=n,o=I(r),i=Jo(t);return P(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function ng(e){const t=I({value:e,previous:e});return te(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const br=globalThis!=null&&globalThis.document?Ie:()=>{};function rg(e){const[t,n]=M(void 0);return br(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const pt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=O((r,o)=>{const{asChild:i,...a}=r,s=i?it:t;return P(()=>{window[Symbol.for("radix-ui")]=!0},[]),$(s,F({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Bc="Switch",[og,pv]=gr(Bc),[ig,ag]=og(Bc),sg=O((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,...l}=e,[f,p]=M(null),h=pn(t,y=>p(y)),m=I(!1),g=f?!!f.closest("form"):!0,[b=!1,v]=Zo({prop:o,defaultProp:i,onChange:u});return $(ig,{scope:n,checked:b,disabled:s},$(pt.button,F({type:"button",role:"switch","aria-checked":b,"aria-required":a,"data-state":zc(b),"data-disabled":s?"":void 0,disabled:s,value:c},l,{ref:h,onClick:Xe(e.onClick,y=>{v(w=>!w),g&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})})),g&&$(ug,{control:f,bubbles:!m.current,name:r,value:c,checked:b,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),cg="SwitchThumb",lg=O((e,t)=>{const{__scopeSwitch:n,...r}=e,o=ag(cg,n);return $(pt.span,F({"data-state":zc(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))}),ug=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=I(null),a=ng(n),s=rg(t);return P(()=>{const c=i.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&f){const p=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(p)}},[a,n,r]),$("input",F({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function zc(e){return e?"checked":"unchecked"}const dg=sg,fg=lg,pg=z(dg,{all:"unset",boxSizing:"content-box",position:"relative",flexShrink:0,width:"$$width",height:"$$height",padding:"2px",borderRadius:"$pill",backgroundColor:"$blackAlpha300",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",'&[data-state="checked"]':{backgroundColor:"$green900"},variants:{size:{sm:{$$width:"22px",$$height:"12px"},md:{$$width:"30px",$$height:"16px"},lg:{$$width:"46px",$$height:"24px"}}},defaultVariants:{size:"md"}}),hg=z(fg,{display:"block",size:"$$size",borderRadius:"$pill",backgroundColor:"$white",transitionDuration:"200ms",transitionProperty:"transform",willChange:"transform",'&[data-state="checked"]':{transform:"translateX(calc($$size - 2px))"},variants:{size:{sm:{$$size:"12px"},md:{$$size:"16px"},lg:{$$size:"24px"}}},defaultVariants:{size:"md"}}),Fc=O(function(t,n){const{className:r,css:o={},size:i="md",...a}=t,s=ye("r2b-switch",r);return d(pg,{...a,className:s,css:o,size:i,ref:n,children:d(hg,{size:i})})});function mg(e){const t=e+"CollectionProvider",[n,r]=gr(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=h=>{const{scope:m,children:g}=h,b=V.useRef(null),v=V.useRef(new Map).current;return V.createElement(o,{scope:m,itemMap:v,collectionRef:b},g)},s=e+"CollectionSlot",c=V.forwardRef((h,m)=>{const{scope:g,children:b}=h,v=i(s,g),y=pn(m,v.collectionRef);return V.createElement(it,{ref:y},b)}),u=e+"CollectionItemSlot",l="data-radix-collection-item",f=V.forwardRef((h,m)=>{const{scope:g,children:b,...v}=h,y=V.useRef(null),w=pn(m,y),C=i(u,g);return V.useEffect(()=>(C.itemMap.set(y,{ref:y,...v}),()=>void C.itemMap.delete(y))),V.createElement(it,{[l]:"",ref:w},b)});function p(h){const m=i(e+"CollectionConsumer",h);return V.useCallback(()=>{const b=m.collectionRef.current;if(!b)return[];const v=Array.from(b.querySelectorAll(`[${l}]`));return Array.from(m.itemMap.values()).sort((C,T)=>v.indexOf(C.ref.current)-v.indexOf(T.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},p,r]}const gg=fa["useId".toString()]||(()=>{});let bg=0;function Lc(e){const[t,n]=M(gg());return br(()=>{e||n(r=>r??String(bg++))},[e]),e||(t?`radix-${t}`:"")}const vg=ue(void 0);function Mc(e){const t=me(vg);return e||t||"ltr"}const Yo="rovingFocusGroup.onEntryFocus",$g={bubbles:!1,cancelable:!0},Qo="RovingFocusGroup",[ei,Wc,yg]=mg(Qo),[_g,Hc]=gr(Qo,[yg]),[wg,xg]=_g(Qo),Cg=O((e,t)=>$(ei.Provider,{scope:e.__scopeRovingFocusGroup},$(ei.Slot,{scope:e.__scopeRovingFocusGroup},$(Sg,F({},e,{ref:t}))))),Sg=O((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,...l}=e,f=I(null),p=pn(t,f),h=Mc(i),[m=null,g]=Zo({prop:a,defaultProp:s,onChange:c}),[b,v]=M(!1),y=Jo(u),w=Wc(n),C=I(!1),[T,B]=M(0);return P(()=>{const A=f.current;if(A)return A.addEventListener(Yo,y),()=>A.removeEventListener(Yo,y)},[y]),$(wg,{scope:n,orientation:r,dir:h,loop:o,currentTabStopId:m,onItemFocus:X(A=>g(A),[g]),onItemShiftTab:X(()=>v(!0),[]),onFocusableItemAdd:X(()=>B(A=>A+1),[]),onFocusableItemRemove:X(()=>B(A=>A-1),[])},$(pt.div,F({tabIndex:b||T===0?-1:0,"data-orientation":r},l,{ref:p,style:{outline:"none",...e.style},onMouseDown:Xe(e.onMouseDown,()=>{C.current=!0}),onFocus:Xe(e.onFocus,A=>{const E=!C.current;if(A.target===A.currentTarget&&E&&!b){const K=new CustomEvent(Yo,$g);if(A.currentTarget.dispatchEvent(K),!K.defaultPrevented){const J=w().filter(Z=>Z.focusable),ie=J.find(Z=>Z.active),fe=J.find(Z=>Z.id===m),pe=[ie,fe,...J].filter(Boolean).map(Z=>Z.ref.current);jc(pe)}}C.current=!1}),onBlur:Xe(e.onBlur,()=>v(!1))})))}),kg="RovingFocusGroupItem",Eg=O((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=Lc(),c=i||s,u=xg(kg,n),l=u.currentTabStopId===c,f=Wc(n),{onFocusableItemAdd:p,onFocusableItemRemove:h}=u;return P(()=>{if(r)return p(),()=>h()},[r,p,h]),$(ei.ItemSlot,{scope:n,id:c,focusable:r,active:o},$(pt.span,F({tabIndex:l?0:-1,"data-orientation":u.orientation},a,{ref:t,onMouseDown:Xe(e.onMouseDown,m=>{r?u.onItemFocus(c):m.preventDefault()}),onFocus:Xe(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:Xe(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){u.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const g=Ag(m,u.orientation,u.dir);if(g!==void 0){m.preventDefault();let v=f().filter(y=>y.focusable).map(y=>y.ref.current);if(g==="last")v.reverse();else if(g==="prev"||g==="next"){g==="prev"&&v.reverse();const y=v.indexOf(m.currentTarget);v=u.loop?Tg(v,y+1):v.slice(y+1)}setTimeout(()=>jc(v))}})})))}),Og={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Pg(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ag(e,t,n){const r=Pg(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Og[r]}function jc(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Tg(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Rg=Cg,Ig=Eg;function Ng(e,t){return Re((n,r)=>{const o=t[n][r];return o??n},e)}const Uc=e=>{const{present:t,children:n}=e,r=Dg(t),o=typeof n=="function"?n({present:r.isPresent}):$e.only(n),i=pn(r.ref,o.ref);return typeof n=="function"||r.isPresent?et(o,{ref:i}):null};Uc.displayName="Presence";function Dg(e){const[t,n]=M(),r=I({}),o=I(e),i=I("none"),a=e?"mounted":"unmounted",[s,c]=Ng(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P(()=>{const u=vr(r.current);i.current=s==="mounted"?u:"none"},[s]),br(()=>{const u=r.current,l=o.current;if(l!==e){const p=i.current,h=vr(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(l&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),br(()=>{if(t){const u=f=>{const h=vr(r.current).includes(f.animationName);f.target===t&&h&&nn(()=>c("ANIMATION_END"))},l=f=>{f.target===t&&(i.current=vr(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:X(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function vr(e){return(e==null?void 0:e.animationName)||"none"}const Vc="Tabs",[Bg,hv]=gr(Vc,[Hc]),qc=Hc(),[zg,ti]=Bg(Vc),Fg=O((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:a="horizontal",dir:s,activationMode:c="automatic",...u}=e,l=Mc(s),[f,p]=Zo({prop:r,onChange:o,defaultProp:i});return $(zg,{scope:n,baseId:Lc(),value:f,onValueChange:p,orientation:a,dir:l,activationMode:c},$(pt.div,F({dir:l,"data-orientation":a},u,{ref:t})))}),Lg="TabsList",Mg=O((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=ti(Lg,n),a=qc(n);return $(Rg,F({asChild:!0},a,{orientation:i.orientation,dir:i.dir,loop:r}),$(pt.div,F({role:"tablist","aria-orientation":i.orientation},o,{ref:t})))}),Wg="TabsTrigger",Hg=O((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,a=ti(Wg,n),s=qc(n),c=Kc(a.baseId,r),u=Xc(a.baseId,r),l=r===a.value;return $(Ig,F({asChild:!0},s,{focusable:!o,active:l}),$(pt.button,F({type:"button",role:"tab","aria-selected":l,"aria-controls":u,"data-state":l?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c},i,{ref:t,onMouseDown:Xe(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?a.onValueChange(r):f.preventDefault()}),onKeyDown:Xe(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&a.onValueChange(r)}),onFocus:Xe(e.onFocus,()=>{const f=a.activationMode!=="manual";!l&&!o&&f&&a.onValueChange(r)})})))}),jg="TabsContent",Ug=O((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...a}=e,s=ti(jg,n),c=Kc(s.baseId,r),u=Xc(s.baseId,r),l=r===s.value,f=I(l);return P(()=>{const p=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(p)},[]),$(Uc,{present:o||l},({present:p})=>$(pt.div,F({"data-state":l?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":c,hidden:!p,id:u,tabIndex:0},a,{ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0}}),p&&i))});function Kc(e,t){return`${e}-trigger-${t}`}function Xc(e,t){return`${e}-content-${t}`}const Vg=Fg,qg=Mg,Kg=Hg,Xg=Ug,Gg=z(Vg,{display:"flex",flexDirection:"column",flexGrow:1,overflow:"auto"}),Jg=z(qg,{display:"flex",flexGrow:0,flexBasis:"auto",borderBottom:"1px solid $gray200"}),Gc=z(Kg,{all:"unset",fontFamily:"inherit",backgroundColor:"$white",paddingX:"$4",height:"45px",flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:"$sm",lineHeight:1,color:"$gray600",userSelect:"none","&:hover":{color:"$primary500"},'&[data-state="active"]':{color:"$primary500",fontWeight:"$semibold",boxShadow:"inset 0 -1px 0 0 currentColor, 0 1px 0 0 currentColor"}}),Jc=z(Xg,{flexGrow:1,overflowY:"auto"});function Zc(){return d(R,{size:"sm",css:{w:"$full",mt:"auto",ta:"center"},children:[Xr," é um produto e marca registrada da"," ",d(Oe,{size:"sm",href:Gl,children:"Zaply"})," ","- (",Xl,")"]})}function Zg(e){const{onClickBackBtn:t,onClickCloseBtn:n,onChangePostalCodeConsent:r,onChangeTrackingConsent:o,onDeleteData:i,postalCodeConsent:a,trackingConsent:s}=e;return d(H,{direction:"column",css:{zIndex:"$modal",position:"absolute",top:0,left:0,size:"$full",backgroundColor:"$gray100"},children:[d(St,{children:[d(kt,{children:"Configuração"}),d(Se,{icon:d(N,{as:Ao}),onClick:t}),d(Se,{icon:d(N,{as:je}),onClick:n})]}),d(Gg,{defaultValue:"data",children:[d(Jg,{children:[d(Gc,{value:"data",children:"Dados"}),d(Gc,{value:"faq",children:"FAQ"})]}),d(Jc,{value:"faq",children:d(He,{asChild:!0,maxWidth:"sm",children:d(H,{direction:"column",gap:6,css:{py:"$6"},children:[d(re,{children:[d(le,{children:"Perguntas frequentes"}),d(R,{size:"sm",css:{mt:"$4"},children:"Encontre abaixo as respostas para suas dúvidas."})]}),d(xn,{as:Dc,gap:4,align:"center",css:{ta:"center"},children:[d(N,{as:dp,size:"lg"}),d(le,{size:"sm",children:"Problema no seu pedido?"}),d(R,{size:"sm",children:"Entre em contato com nosso Serviço de Atendimento ao Cliente."}),d(Oe,{size:"sm",href:`mailto:${ma}`,children:ma})]}),d(xn,{as:Dc,gap:4,align:"center",css:{ta:"center"},children:[d(N,{as:up,size:"lg"}),d(le,{size:"sm",children:"Solicitar esclarecimento sobre seus dados?"}),d(R,{size:"sm",children:"Entre em contato com nosso Encarregado de Proteção de Dados."}),d(Oe,{size:"sm",href:`mailto:${Fn}`,children:Fn})]}),d(Zc,{})]})})}),d(Jc,{value:"data",children:d(He,{asChild:!0,maxWidth:"sm",children:d(H,{direction:"column",gap:6,css:{py:"$6"},children:[d(re,{children:[d(le,{children:"Privacidade e coleta de dados"}),d(R,{size:"sm",css:{mt:"$4",mb:"$2"},children:["O ",Xr," usa informações do navegador para melhorar a experiência do usuário."]}),d(Oe,{size:"sm",href:"https://zaply.com.br/politica-de-privacidade",children:"Ler política de privacidade"})]}),d(xn,{children:[d(H,{align:"center",justify:"between",children:[d(H,{align:"center",gap:2,children:[d(N,{as:To,size:"md"}),d(le,{size:"sm",children:"Código postal"})]}),d(Fc,{onCheckedChange:r,checked:a})]}),d(kn,{size:"fill",css:{my:"$4"}}),d(re,{children:[d(le,{size:"xs",children:"Salvar meu código postal"}),d(R,{size:"sm",css:{mt:"$2"},children:"Ao desativar esta opção, seu código postal será armazenado apenas durante esta sessão. Caso contrário, em sua próxima experiência, você não precisará preenchê-lo novamente."})]})]}),d(xn,{children:[d(H,{align:"center",justify:"between",children:[d(H,{align:"center",gap:2,children:[d(N,{as:lp,size:"md"}),d(le,{size:"sm",children:"Coleta de dados"})]}),d(Fc,{onCheckedChange:o,checked:s})]}),d(kn,{size:"fill",css:{my:"$4"}}),d(re,{children:d(R,{size:"sm",children:"Ao desativar esta opção, seus dados de navegação não serão coletados nem compartilhados. Caso contrário, você concorda que as informações obtidas do seu navegador e durante sua interação, poderão ser armazenadas e compartilhadas com terceiros, como o proprietário deste site ou conteúdo."})})]}),d(xn,{children:[d(H,{align:"center",gap:2,children:[d(N,{as:Ds,size:"md"}),d(le,{size:"sm",children:"Limpar dados"})]}),d(kn,{size:"fill",css:{my:"$4"}}),d(re,{children:[d(R,{size:"sm",children:"Ao pressionar o botão abaixo, os dados coletados e armazenados em seu navegador, durante esta sessão, serão deletados permanentemente."}),d(Yf,{size:"small",variant:"negative",label:"Limpar dados",onClick:i,css:{my:"$4"}}),d(R,{size:"xs",variant:"muted",children:["Para solicitar a exclusão completa de seus dados junto à Zaply, entre em contato pelo e-mail:"," ",d(Oe,{size:"xs",href:`mailto:${Fn}`,children:Fn}),"."]})]})]}),d(Zc,{})]})})})]})]})}function Yg(e){const{onCloseWidget:t,productsQuantity:n,retailerLogo:r,retailerName:o}=e;return d(Y,{children:[d(H,{css:{w:"$full",ai:"center",jc:"flex-end",pos:"absolute",py:"$2",px:"$3"},children:d(Ue,{variant:"ghost",colorScheme:"gray",onClick:t,children:d(N,{as:je})})}),d(qo,{children:[d(Tt,{src:r,alt:`Varejista: ${o}`,css:{size:"60px !important",maw:"60px",miw:"60px",mx:"auto",op:1,bgc:"$white",objectFit:"contain",p:"4px",bdw:"3px",bdc:"$primary500",bds:"solid",bdrs:"$round",ov:"hidden"}}),d(le,{css:{w:"$full",mt:"$4",mb:"$2"},children:"Produtos adicionados com sucesso!"}),d(R,{css:{mb:"$4"},children:["Adicionamos ",n," ",n>1?"produtos":"produto"," ao seu carrinho no e-commerce do ",o,"."]}),d(Pe,{variant:"solid",colorScheme:"primary",onClick:t,children:"Entendi"})]})]})}const Qg=1500;function e0(){var c,u,l;const e=We(),t=vt(),n=wt(),r=xt(),o=ze(),i=!!t.geolocation,a=n.valid;P(()=>{t.gaId.length&&(xm({id:t.gaId,name:jl,cookieDomain:Hl,type:ft(t.gaId)}),At({eventAction:"r2b_clique",eventCategory:"Recipe2Basket",eventLabel:t.recipe.name??null,method:ft(t.gaId),value:0}))},[t.gaId,t.recipe.name]),P(()=>{var f,p,h,m;r.consent.tracking&&km({city:((f=t.geolocation)==null?void 0:f.city)??"",country:((p=t.geolocation)==null?void 0:p.country)??"",device:Ke(),eventId:t.eventId,partner:t.partner,state:((h=t.geolocation)==null?void 0:h.state)??"",url:t.recipe.url,title:((m=t.recipe.name)==null?void 0:m.replace(/\s+/g," ").trim())??""})},[r.consent.tracking,t.eventId,(c=t.geolocation)==null?void 0:c.city,(u=t.geolocation)==null?void 0:u.country,(l=t.geolocation)==null?void 0:l.state,t.partner,t.recipe.url,t.recipe.name]),P(()=>{const f=window.setTimeout(()=>{if(a||i){o.push(st);return}o.push(rn,null)},Qg);return()=>{window.clearTimeout(f)}},[i,a,o]);function s(){e.onClose()}return d(Tc,{title:"Estamos realizando as configurações iniciais.",text:"Por favor, aguarde!",onClose:s})}const t0=we(e0);function $r(e={}){const{defaultIsOpen:t,onClose:n,onOpen:r}=e,[o,i]=M(t??!1),a=X(()=>{i(!1),n==null||n()},[n]),s=X(()=>{i(!0),r==null||r()},[r]),c=X(()=>{if(o){a();return}s()},[a,s,o]);return{isOpen:o,onClose:a,onOpen:s,onToggle:c}}function Yc(e){P(e,[])}function n0(e){return window.matchMedia(e).matches}function r0(e){const[t,n]=M(n0(e));return P(()=>{const r=window.matchMedia(e),o=()=>{n(!!r.matches)};return r.addEventListener("change",o),n(r.matches),()=>{r.removeEventListener("change",o)}},[e]),t}let yr="";function o0(){const e=We(),t=$n(),n=xt(),r=gn(),o=wt(),i=ze(),a=wo(),s=I(null),c=!!a.previous,u=!!o.value.length&&!o.valid;Yc(()=>{yr=o.value}),Ie(()=>{var b;(b=s.current)==null||b.focus()},[]);function l(){return t.list.length===1?Dn:t.list.length>1?Bn:a.previous}function f(){if(u)return;const b=Be();r.change(yr,()=>{n.consent.postalCode&&b.set(v=>({...v,postalCode:yr})),i.push(l())})}function p(){i.push(Bt)}function h(){e.onClose()}function m(b){const v=Be();r.change(b,()=>{n.consent.postalCode&&v.set(y=>({...y,postalCode:b}))})}function g(){if(o.valid){if(o.value!==yr){i.push(st);return}i.push(l())}}return d(Xm,{ref:s,onClickBackBtn:f,onClickSettingsBtn:p,onCloseWidget:h,onChangePostalCode:m,onSubmitPostalCode:g,showBackBtn:c,disabledBackBtn:u,isValidPostalCode:o.valid,postalCodeValue:o.value})}const i0=we(o0);function Qc(e,t=" "){return e.split(t).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(t)}async function el(e,t={}){const{signal:n}=t,{data:r,error:o}=await Lt(ln.post("/checkout",e,{...n?{signal:n}:{}}));return!r||o?(de(()=>{tt("Failed to get checkout url")}),null):r.data}async function tl(e){const{data:t,error:n}=await Lt(ln.get("/check-postalcode",{params:e}));return!t||n?(de(()=>{tt("Failed to check the availability of the zip code for this market")}),null):t.data}let _r;function a0(){var En,Tr,Rr,Ir;const e=localStorage.getItem("render-toast")==="true",t=We(),n=vt(),r=Eo(),o=$n(),i=xt(),a=wt(),s=gn(),c=ze(),u=Ro(),l=I(null),[f,p]=M(""),[h,m]=M(!1),[g,b]=M(null),v=$r(),y=$r(),w=o.active.products.filter(L=>L._active).reduce((L,j)=>L+j.price*j.count,0),C=`Alterar localização: ${(En=n.geolocation)!=null&&En.city&&!a.value.length?Qc(n.geolocation.city):a.value}`;function T(L){const j=L.filter(Q=>Q.brand!==null);return j.length===0?0:j.reduce((Q,U)=>Q+U.price,0)}P(()=>{var ae,Q,U,xe;const L={city:((ae=n.geolocation)==null?void 0:ae.city)??"",country:((Q=n.geolocation)==null?void 0:Q.country)??"",device:Ke(),eventId:n.eventId,partner:n.partner,state:((U=n.geolocation)==null?void 0:U.state)??"",supermarket:o.active.name,url:n.recipe.url,title:((xe=n.recipe.name)==null?void 0:xe.replace(/\s+/g," ").trim())??""},j=o.active.products.filter(Ee=>typeof Ee.campaignId=="number");if(j.length){const Ee=j.map(mt=>mt.campaignId);Object.assign(L,{campaign:JSON.stringify(Ee)})}i.consent.tracking&&vc(L),At({eventAction:"r2b_seller_definido",eventCategory:"Recipe2Basket",eventLabel:o.active.name??null,method:ft(n.gaId),value:0})},[o.active.name,o.active.products,o.active.urlSite,i.consent.tracking,n.campaign,n.eventId,(Tr=n.geolocation)==null?void 0:Tr.city,(Rr=n.geolocation)==null?void 0:Rr.country,(Ir=n.geolocation)==null?void 0:Ir.state,n.partner,n.recipe.name,n.recipe.url,n.gaId]);function B(){var L,j,ae,Q;i.consent.tracking&&pr({city:((L=n.geolocation)==null?void 0:L.city)??"",country:((j=n.geolocation)==null?void 0:j.country)??"",device:Ke(),eventId:n.eventId,partner:n.partner,state:((ae=n.geolocation)==null?void 0:ae.state)??"",url:n.recipe.url,supermarket:o.active.name,title:((Q=n.recipe.name)==null?void 0:Q.replace(/\s+/g," ").trim())??""}),t.onClose()}function A(){c.push(Bt)}function E(){c.push(rn)}async function K(){var Q;if(h)return;_r=new AbortController,m(!0);const L=o.active.products.filter(U=>U._active),j=(Q=n==null?void 0:n.recipe)==null?void 0:Q.name,ae=await el({cep:a.value,eventId:n.eventId,partner:n.partner,products:L.map(U=>({name:U.name,extId:U.extId,qty:U.count})),supermarket:{customParam:o.active.customParam,id:o.active.id,locationId:o.active.location,seller:o.active.seller,url:o.active.urlSite},utmCampaign:j?j.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/\s+/g,"_"):"",utmContent:"receita",utmMedium:"zaplyshoppableplatform",utmSource:n.utmSource},{signal:_r.signal});if(!ae){m(!1);return}m(!1),p(ae)}function J(L){var U,xe,Ee,mt;if(o.active.postalcodeRequired&&!a.valid){L.preventDefault(),y.onOpen(),localStorage.setItem("render-toast","true");return}if(h)return;const j=o.active.products.filter(S=>S._active);if(!f){u({type:"error",content:"Falha ao adicionar os produtos, tente novamente."});return}const ae={cartPrice:+w.toFixed(2),city:((U=n.geolocation)==null?void 0:U.city)??"",country:((xe=n.geolocation)==null?void 0:xe.country)??"",device:Ke(),eventId:n.eventId,partner:n.partner,state:((Ee=n.geolocation)==null?void 0:Ee.state)??"",supermarket:o.active.name,url:n.recipe.url,cep:a.value,title:((mt=n.recipe.name)==null?void 0:mt.replace(/\s+/g," ").trim())??"",products:o.active.products.filter(S=>S._active).map(S=>({name:S.name,ingredient:S.ingredient,ingredientZaply:S.ingredientZaply,ingredientZaplyId:String(S.ingredientZaplyId),price:S.price,quantity:S.count,isBranded:!!S.brand,gtin:S.gtin??null,...S.brand&&{brand:S.brand},...S.secondaryBrand&&{secondaryBrand:S.secondaryBrand},...S.tertiaryBrand&&{tertiaryBrand:S.tertiaryBrand}}))},Q=j.filter(S=>typeof S.campaignId=="number");if(Q.length){const S=Q.map(D=>D.campaignId);Object.assign(ae,{products:j.map(D=>D.name),campaign:JSON.stringify(S)})}i.consent.tracking&&$c(ae),At({eventAction:"r2b_carrinho",eventCategory:"Recipe2Basket",eventLabel:o.active.name,method:ft(n.gaId),value:Math.ceil(w)}),At({eventAction:"r2b_produtos_de_marca",eventCategory:"Recipe2Basket",eventLabel:o.active.name,method:ft(n.gaId),value:T(o.active.products)}),localStorage.removeItem("render-toast"),c.push(zn)}P(()=>{o.active.products&&K()},[o.active.products]),P(()=>()=>{h&&_r&&_r.abort()},[h]);function ie(L,j){const ae=o.active.products.map(Q=>{if(Q.name===L.name){const U=j(Q.count);return{...Q,_active:U>0,count:U}}return Q});r.onChange(Q=>Q.map(U=>U._id===o.active._id?{...o.active,products:ae}:U))}function fe(L){ie(L,j=>{const ae=j-1;return ae<1?0:ae})}function ge(L){ie(L,j=>j+1)}function pe(L,j){r.onChange(ae=>ae.map(Q=>Q._id===o.active._id?{...o.active,products:o.active.products.map(U=>{const xe=U._id===L._id;return{...U,_active:xe?j:U._active,count:xe&&U.count<1?1:U.count}})}:Q))}function Z(){b(null),v.onClose()}function Je(L){b(L),v.onOpen()}function ke(L){if(!g)return;function j(){u({type:"success",content:"Produto alterado com sucesso."}),Z()}r.onChange(ae=>ae.map(Q=>Q._id===o.active._id?{...o.active,products:o.active.products.map(U=>{var xe;return U._id!==g._id?U:{...L,_active:U._active,count:U.count,swap:(xe=U.swap)==null?void 0:xe.map(Ee=>{if(Ee._id!==L._id)return Ee;const{swap:mt,...S}=g;return{...S,count:Ee.count}})}})}:Q),j)}function It(L){const j=Be();s.change(L,()=>{i.consent.postalCode&&j.set(ae=>({...ae,postalCode:L}))})}return P(()=>{a.valid&&y.isOpen&&(async()=>{const j=await tl({postalcode:a.value,supermarketId:o.active.id});if(!(j!=null&&j.isValid)){y.onClose(),c.push(st);return}K()})()},[a.valid,y.isOpen,o]),Ie(()=>{var L;y.isOpen&&((L=l.current)==null||L.focus())},[y.isOpen]),P(()=>{e&&!y.isOpen&&u({type:"warning",onClose:()=>localStorage.removeItem("render-toast"),content:"O lojista escolhido não atende o CEP informado. Selecione um dos lojistas disponíveis para continuar."})},[]),d(Zm,{onClickCloseBtn:B,onClickSettingsBtn:A,onClickCheckoutBtn:J,onClickLocationBtn:E,onDecrementProduct:fe,onIncrementProduct:ge,onToggleActive:pe,onCloseSwapper:Z,onOpenSwapper:Je,onSwapProduct:ke,onChangePostalCode:It,postalCodeValue:a.value,open:y.isOpen,isSwapperOpen:v.isOpen,swapperProduct:g,checkoutUrl:f,isFetchingCheckoutUrl:h,disabledCheckoutBtn:h||w<=0,locationLabel:C,cartPrice:w,active:o.active})}const s0=we(a0);/*! * Glide.js v3.6.0 * (c) 2013-2022 Jędrzej Chałubek (https://github.com/jedrzejchalubek/) * Released under the MIT License. */function wr(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?wr=function(t){return typeof t}:wr=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wr(e)}function xr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nl(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function u0(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d0(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return u0(e)}function f0(e){var t=l0();return function(){var r=Xt(e),o;if(t){var i=Xt(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return d0(this,o)}}function p0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Xt(e),e!==null););return e}function Sr(){return typeof Reflect<"u"&&Reflect.get?Sr=Reflect.get:Sr=function(t,n,r){var o=p0(t,n);if(o){var i=Object.getOwnPropertyDescriptor(o,n);return i.get?i.get.call(arguments.length<3?t:r):i.value}},Sr.apply(this,arguments)}var h0={type:"slider",startAt:0,perView:1,focusAt:0,gap:10,autoplay:!1,hoverpause:!0,keyboard:!0,bound:!1,swipeThreshold:80,dragThreshold:120,perSwipe:"",touchRatio:.5,touchAngle:45,animationDuration:400,rewind:!0,rewindDuration:800,animationTimingFunc:"cubic-bezier(.165, .840, .440, 1)",waitForTransition:!0,throttle:10,direction:"ltr",peek:0,cloningRatio:1,breakpoints:{},classes:{swipeable:"glide--swipeable",dragging:"glide--dragging",direction:{ltr:"glide--ltr",rtl:"glide--rtl"},type:{slider:"glide--slider",carousel:"glide--carousel"},slide:{clone:"glide__slide--clone",active:"glide__slide--active"},arrow:{disabled:"glide__arrow--disabled"},nav:{active:"glide__bullet--active"}}};function Ge(e){console.error("[Glide warn]: ".concat(e))}function ve(e){return parseInt(e)}function m0(e){return parseFloat(e)}function ri(e){return typeof e=="string"}function Gt(e){var t=wr(e);return t==="function"||t==="object"&&!!e}function kr(e){return typeof e=="function"}function rl(e){return typeof e>"u"}function oi(e){return e.constructor===Array}function g0(e,t,n){var r={};for(var o in t)kr(t[o])?r[o]=t[o](e,r,n):Ge("Extension must be a function");for(var i in r)kr(r[i].mount)&&r[i].mount();return r}function se(e,t,n){Object.defineProperty(e,t,n)}function b0(e){return Object.keys(e).sort().reduce(function(t,n){return t[n]=e[n],t[n],t},{})}function ii(e,t){var n=Object.assign({},e,t);return t.hasOwnProperty("classes")&&(n.classes=Object.assign({},e.classes,t.classes),t.classes.hasOwnProperty("direction")&&(n.classes.direction=Object.assign({},e.classes.direction,t.classes.direction)),t.classes.hasOwnProperty("type")&&(n.classes.type=Object.assign({},e.classes.type,t.classes.type)),t.classes.hasOwnProperty("slide")&&(n.classes.slide=Object.assign({},e.classes.slide,t.classes.slide)),t.classes.hasOwnProperty("arrow")&&(n.classes.arrow=Object.assign({},e.classes.arrow,t.classes.arrow)),t.classes.hasOwnProperty("nav")&&(n.classes.nav=Object.assign({},e.classes.nav,t.classes.nav))),t.hasOwnProperty("breakpoints")&&(n.breakpoints=Object.assign({},e.breakpoints,t.breakpoints)),n}var v0=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};xr(this,e),this.events=t,this.hop=t.hasOwnProperty}return Cr(e,[{key:"on",value:function(n,r){if(oi(n)){for(var o=0;o1&&arguments[1]!==void 0?arguments[1]:{};xr(this,e),this._c={},this._t=[],this._e=new v0,this.disabled=!1,this.selector=t,this.settings=ii(h0,n),this.index=this.settings.startAt}return Cr(e,[{key:"mount",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this._e.emit("mount.before"),Gt(n)?this._c=g0(this,n,this._e):Ge("You need to provide a object on `mount()`"),this._e.emit("mount.after"),this}},{key:"mutate",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return oi(n)?this._t=n:Ge("You need to provide a array on `mutate()`"),this}},{key:"update",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.settings=ii(this.settings,n),n.hasOwnProperty("startAt")&&(this.index=n.startAt),this._e.emit("update"),this}},{key:"go",value:function(n){return this._c.Run.make(n),this}},{key:"move",value:function(n){return this._c.Transition.disable(),this._c.Move.make(n),this}},{key:"destroy",value:function(){return this._e.emit("destroy"),this}},{key:"play",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return n&&(this.settings.autoplay=n),this._e.emit("play"),this}},{key:"pause",value:function(){return this._e.emit("pause"),this}},{key:"disable",value:function(){return this.disabled=!0,this}},{key:"enable",value:function(){return this.disabled=!1,this}},{key:"on",value:function(n,r){return this._e.on(n,r),this}},{key:"isType",value:function(n){return this.settings.type===n}},{key:"settings",get:function(){return this._o},set:function(n){Gt(n)?this._o=n:Ge("Options must be an `object` instance.")}},{key:"index",get:function(){return this._i},set:function(n){this._i=ve(n)}},{key:"type",get:function(){return this.settings.type}},{key:"disabled",get:function(){return this._d},set:function(n){this._d=!!n}}]),e}();function y0(e,t,n){var r={mount:function(){this._o=!1},make:function(u){var l=this;e.disabled||(!e.settings.waitForTransition||e.disable(),this.move=u,n.emit("run.before",this.move),this.calculate(),n.emit("run",this.move),t.Transition.after(function(){l.isStart()&&n.emit("run.start",l.move),l.isEnd()&&n.emit("run.end",l.move),l.isOffset()&&(l._o=!1,n.emit("run.offset",l.move)),n.emit("run.after",l.move),e.enable()}))},calculate:function(){var u=this.move,l=this.length,f=u.steps,p=u.direction,h=1;if(p==="="){if(e.settings.bound&&ve(f)>l){e.index=l;return}e.index=f;return}if(p===">"&&f===">"){e.index=l;return}if(p==="<"&&f==="<"){e.index=0;return}if(p==="|"&&(h=e.settings.perView||1),p===">"||p==="|"&&f===">"){var m=o(h);m>l&&(this._o=!0),e.index=i(m,h);return}if(p==="<"||p==="|"&&f==="<"){var g=a(h);g<0&&(this._o=!0),e.index=s(g,h);return}Ge("Invalid direction pattern [".concat(p).concat(f,"] has been used"))},isStart:function(){return e.index<=0},isEnd:function(){return e.index>=this.length},isOffset:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;return u?this._o?u==="|>"?this.move.direction==="|"&&this.move.steps===">":u==="|<"?this.move.direction==="|"&&this.move.steps==="<":this.move.direction===u:!1:this._o},isBound:function(){return e.isType("slider")&&e.settings.focusAt!=="center"&&e.settings.bound}};function o(c){var u=e.index;return e.isType("carousel")?u+c:u+(c-u%c)}function i(c,u){var l=r.length;return c<=l?c:e.isType("carousel")?c-(l+1):e.settings.rewind?r.isBound()&&!r.isEnd()?l:0:r.isBound()?l:Math.floor(l/u)*u}function a(c){var u=e.index;if(e.isType("carousel"))return u-c;var l=Math.ceil(u/c);return(l-1)*c}function s(c,u){var l=r.length;return c>=0?c:e.isType("carousel")?c+(l+1):e.settings.rewind?r.isBound()&&r.isStart()?l:Math.floor(l/u)*u:0}return se(r,"move",{get:function(){return this._m},set:function(u){var l=u.substr(1);this._m={direction:u.substr(0,1),steps:l?ve(l)?ve(l):l:0}}}),se(r,"length",{get:function(){var u=e.settings,l=t.Html.slides.length;return this.isBound()?l-1-(ve(u.perView)-1)+ve(u.focusAt):l-1}}),se(r,"offset",{get:function(){return this._o}}),r}function ol(){return new Date().getTime()}function Er(e,t,n){var r,o,i,a,s=0;n||(n={});var c=function(){s=n.leading===!1?0:ol(),r=null,a=e.apply(o,i),r||(o=i=null)},u=function(){var f=ol();!s&&n.leading===!1&&(s=f);var p=t-(f-s);return o=this,i=arguments,p<=0||p>t?(r&&(clearTimeout(r),r=null),s=f,a=e.apply(o,i),r||(o=i=null)):!r&&n.trailing!==!1&&(r=setTimeout(c,p)),a};return u.cancel=function(){clearTimeout(r),s=0,r=o=i=null},u}var Or={ltr:["marginLeft","marginRight"],rtl:["marginRight","marginLeft"]};function _0(e,t,n){var r={apply:function(i){for(var a=0,s=i.length;a0&&arguments[0]!==void 0?arguments[0]:0;this.offset=a,n.emit("move",{movement:this.value}),t.Transition.after(function(){n.emit("move.after",{movement:i.value})})}};return se(r,"offset",{get:function(){return r._o},set:function(i){r._o=rl(i)?0:ve(i)}}),se(r,"translate",{get:function(){return t.Sizes.slideWidth*e.index}}),se(r,"value",{get:function(){var i=this.offset,a=this.translate;return t.Direction.is("rtl")?a+i:a-i}}),n.on(["build.before","run"],function(){r.make()}),r}function S0(e,t,n){var r={setupSlides:function(){for(var i="".concat(this.slideWidth,"px"),a=t.Html.slides,s=0;s0&&arguments[0]!==void 0?arguments[0]:[],a=t.Html.slides,s=e.settings,c=s.perView,u=s.classes,l=s.cloningRatio;if(a.length!==0)for(var f=+!!e.settings.peek,p=c+f+Math.round(c/2),h=a.slice(0,p).reverse(),m=a.slice(p*-1),g=0;g0&&arguments[0]!==void 0?arguments[0]:{};xr(this,e),this.listeners=t}return Cr(e,[{key:"on",value:function(n,r,o){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;ri(n)&&(n=[n]);for(var a=0;a2&&arguments[2]!==void 0?arguments[2]:!1;ri(n)&&(n=[n]);for(var i=0;i":"<","<":">","=":"="};function T0(e,t,n){var r={mount:function(){this.value=e.settings.direction},resolve:function(i){var a=i.slice(0,1);return this.is("rtl")?i.split(a).join(A0[a]):i},is:function(i){return this.value===i},addClass:function(){t.Html.root.classList.add(e.settings.classes.direction[this.value])},removeClass:function(){t.Html.root.classList.remove(e.settings.classes.direction[this.value])}};return se(r,"value",{get:function(){return r._v},set:function(i){P0.indexOf(i)>-1?r._v=i:Ge("Direction value must be `ltr` or `rtl`")}}),n.on(["destroy","update"],function(){r.removeClass()}),n.on("update",function(){r.mount()}),n.on(["build.before","update"],function(){r.addClass()}),r}function R0(e,t){return{modify:function(r){return t.Direction.is("rtl")?-r:r}}}function I0(e,t){return{modify:function(r){var o=Math.floor(r/t.Sizes.slideWidth);return r+t.Gaps.value*o}}}function N0(e,t){return{modify:function(r){return r+t.Clones.grow/2}}}function D0(e,t){return{modify:function(r){if(e.settings.focusAt>=0){var o=t.Peek.value;return Gt(o)?r-o.before:r-o}return r}}}function B0(e,t){return{modify:function(r){var o=t.Gaps.value,i=t.Sizes.width,a=e.settings.focusAt,s=t.Sizes.slideWidth;return a==="center"?r-(i/2-s/2):r-s*a-o*a}}}function z0(e,t,n){var r=[I0,N0,D0,B0].concat(e._t,[R0]);return{mutate:function(i){for(var a=0;a")||t.Run.isOffset("|>")?i+(a-s):(a+s)%i},getTravelDistance:function(){var i=t.Sizes.slideWidth*e.settings.perView;return t.Run.isOffset(">")||t.Run.isOffset("|>")?i*-1:i}};return n.on("move",function(o){if(!e.isType("carousel")||!t.Run.isOffset())return r.set(o.movement);t.Transition.after(function(){n.emit("translate.jump"),r.set(t.Sizes.slideWidth*e.index)});var i=t.Sizes.slideWidth*t.Translate.getStartIndex();return r.set(i-t.Translate.getTravelDistance())}),n.on("destroy",function(){r.remove()}),r}function L0(e,t,n){var r=!1,o={compose:function(a){var s=e.settings;return r?"".concat(a," 0ms ").concat(s.animationTimingFunc):"".concat(a," ").concat(this.duration,"ms ").concat(s.animationTimingFunc)},set:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";t.Html.wrapper.style.transition=this.compose(a)},remove:function(){t.Html.wrapper.style.transition=""},after:function(a){setTimeout(function(){a()},this.duration)},enable:function(){r=!1,this.set()},disable:function(){r=!0,this.set()}};return se(o,"duration",{get:function(){var a=e.settings;return e.isType("slider")&&t.Run.offset?a.rewindDuration:a.animationDuration}}),n.on("move",function(){o.set()}),n.on(["build.before","resize","translate.jump"],function(){o.disable()}),n.on("run",function(){o.enable()}),n.on("destroy",function(){o.remove()}),o}var cl=!1;try{var ll=Object.defineProperty({},"passive",{get:function(){cl=!0}});window.addEventListener("testPassive",null,ll),window.removeEventListener("testPassive",null,ll)}catch{}var si=cl,Pr=["touchstart","mousedown"],ul=["touchmove","mousemove"],dl=["touchend","touchcancel","mouseup","mouseleave"],fl=["mousedown","mousemove","mouseup","mouseleave"];function M0(e,t,n){var r=new ht,o=0,i=0,a=0,s=!1,c=si?{passive:!0}:!1,u={mount:function(){this.bindSwipeStart()},start:function(f){if(!s&&!e.disabled){this.disable();var p=this.touches(f);o=null,i=ve(p.pageX),a=ve(p.pageY),this.bindSwipeMove(),this.bindSwipeEnd(),n.emit("swipe.start")}},move:function(f){if(!e.disabled){var p=e.settings,h=p.touchAngle,m=p.touchRatio,g=p.classes,b=this.touches(f),v=ve(b.pageX)-i,y=ve(b.pageY)-a,w=Math.abs(v<<2),C=Math.abs(y<<2),T=Math.sqrt(w+C),B=Math.sqrt(C);if(o=Math.asin(B/T),o*180/Math.PIv&&w"))):t.Move.make(),t.Html.root.classList.remove(g.dragging),this.unbindSwipeMove(),this.unbindSwipeEnd(),n.emit("swipe.end")}},bindSwipeStart:function(){var f=this,p=e.settings,h=p.swipeThreshold,m=p.dragThreshold;h&&r.on(Pr[0],t.Html.wrapper,function(g){f.start(g)},c),m&&r.on(Pr[1],t.Html.wrapper,function(g){f.start(g)},c)},unbindSwipeStart:function(){r.off(Pr[0],t.Html.wrapper,c),r.off(Pr[1],t.Html.wrapper,c)},bindSwipeMove:function(){var f=this;r.on(ul,t.Html.wrapper,Er(function(p){f.move(p)},e.settings.throttle),c)},unbindSwipeMove:function(){r.off(ul,t.Html.wrapper,c)},bindSwipeEnd:function(){var f=this;r.on(dl,t.Html.wrapper,function(p){f.end(p)})},unbindSwipeEnd:function(){r.off(dl,t.Html.wrapper)},touches:function(f){return fl.indexOf(f.type)>-1?f:f.touches[0]||f.changedTouches[0]},threshold:function(f){var p=e.settings;return fl.indexOf(f.type)>-1?p.dragThreshold:p.swipeThreshold},enable:function(){return s=!1,t.Transition.enable(),this},disable:function(){return s=!0,t.Transition.disable(),this}};return n.on("build.after",function(){t.Html.root.classList.add(e.settings.classes.swipeable)}),n.on("destroy",function(){u.unbindSwipeStart(),u.unbindSwipeMove(),u.unbindSwipeEnd(),r.destroy()}),u}function W0(e,t,n){var r=new ht,o={mount:function(){this.bind()},bind:function(){r.on("dragstart",t.Html.wrapper,this.dragstart)},unbind:function(){r.off("dragstart",t.Html.wrapper)},dragstart:function(a){a.preventDefault()}};return n.on("destroy",function(){o.unbind(),r.destroy()}),o}function H0(e,t,n){var r=new ht,o=!1,i=!1,a={mount:function(){this._a=t.Html.wrapper.querySelectorAll("a"),this.bind()},bind:function(){r.on("click",t.Html.wrapper,this.click)},unbind:function(){r.off("click",t.Html.wrapper)},click:function(c){i&&(c.stopPropagation(),c.preventDefault())},detach:function(){if(i=!0,!o){for(var c=0;c"))),a.code==="ArrowLeft"&&t.Run.make(t.Direction.resolve("".concat(s,"<")))}};return n.on(["destroy","update"],function(){o.unbind()}),n.on("update",function(){o.mount()}),n.on("destroy",function(){r.destroy()}),o}function X0(e,t,n){var r=new ht,o={mount:function(){this.enable(),this.start(),e.settings.hoverpause&&this.bind()},enable:function(){this._e=!0},disable:function(){this._e=!1},start:function(){var a=this;this._e&&(this.enable(),e.settings.autoplay&&rl(this._i)&&(this._i=setInterval(function(){a.stop(),t.Run.make(">"),a.start(),n.emit("autoplay")},this.time)))},stop:function(){this._i=clearInterval(this._i)},bind:function(){var a=this;r.on("mouseover",t.Html.root,function(){a._e&&a.stop()}),r.on("mouseout",t.Html.root,function(){a._e&&a.start()})},unbind:function(){r.off(["mouseover","mouseout"],t.Html.root)}};return se(o,"time",{get:function(){var a=t.Html.slides[e.index].getAttribute("data-glide-autoplay");return ve(a||e.settings.autoplay)}}),n.on(["destroy","update"],function(){o.unbind()}),n.on(["run.before","swipe.start","update"],function(){o.stop()}),n.on(["pause","destroy"],function(){o.disable(),o.stop()}),n.on(["run.after","swipe.end"],function(){o.start()}),n.on(["play"],function(){o.enable(),o.start()}),n.on("update",function(){o.mount()}),n.on("destroy",function(){r.destroy()}),o}function pl(e){return Gt(e)?b0(e):(Ge("Breakpoints option must be an object"),{})}function G0(e,t,n){var r=new ht,o=e.settings,i=pl(o.breakpoints),a=Object.assign({},o),s={match:function(u){if(typeof window.matchMedia<"u"){for(var l in u)if(u.hasOwnProperty(l)&&window.matchMedia("(max-width: ".concat(l,"px)")).matches)return u[l]}return a}};return Object.assign(o,s.match(i)),r.on("resize",window,Er(function(){e.settings=ii(o,s.match(i))},e.settings.throttle)),n.on("update",function(){i=pl(i),a=Object.assign({},o)}),n.on("destroy",function(){r.off("resize",window)}),s}var J0={Html:w0,Translate:F0,Transition:L0,Direction:T0,Peek:x0,Sizes:S0,Gaps:_0,Move:C0,Clones:E0,Resize:O0,Build:k0,Run:y0,Swipe:M0,Images:W0,Anchors:H0,Controls:q0,Keyboard:K0,Autoplay:X0,Breakpoints:G0},Z0=function(e){c0(n,e);var t=f0(n);function n(){return xr(this,n),t.apply(this,arguments)}return Cr(n,[{key:"mount",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Sr(Xt(n.prototype),"mount",this).call(this,Object.assign({},J0,o))}}]),n}($0);let Ar;function Y0(){var U,xe,Ee,mt;const e=localStorage.getItem("render-toast")==="true",t=We(),n=vt(),r=Eo(),o=$n(),i=xt(),a=gn(),s=wt(),c=ze(),u=Ro(),l=I(null),[f,p]=M(""),[h,m]=M(!1),[g,b]=M(null),v=$r(),y=$r(),w=o.active.products.filter(S=>S._active).reduce((S,D)=>S+D.price*D.count,0),C=`Alterar localização: ${(U=n.geolocation)!=null&&U.city&&!s.value.length?Qc(n.geolocation.city):s.value}`,T=r0("(width <= 480px)"),B=o.list.length,A=B===2,E=B>=5,J=60+16,ie=h||w<=0||!s.valid&&y.isOpen,fe=()=>A?J*2:T?J*3:E?J*5:J*3;function ge(S){const D=S.filter(G=>G.brand!==null);return D.length===0?0:D.reduce((G,W)=>G+W.price,0)}Yc(()=>{const S=document.querySelector(".r2b .glide");if(!S)return;const D=new Z0(S,{animationDuration:175,breakpoints:{480:{perView:A?2:3}},dragThreshold:!1,gap:0,focusAt:A?0:"center",keyboard:!1,perSwipe:"|",perView:A?2:E?5:3,type:"carousel",startAt:o.active._index,swipeThreshold:!1,waitForTransition:!0});return D.on("run",()=>{r.onChange(ee=>ee.map((G,W)=>({...G,_active:D.index===W})))}),D.on("mount.after",()=>{const ee=document.querySelector(".r2b .glide__slides");ee&&ee.addEventListener("click",G=>{const W=G.target;!W.matches(".glide__slide")||Array.prototype.indexOf.call(ee.children,W)===-1||D.go(`=${W.dataset.retailerIndex}`)})}),D.mount(),()=>{D.destroy()}}),P(()=>{var ee,G,W,Ae;ke();const S={city:((ee=n.geolocation)==null?void 0:ee.city)??"",country:((G=n.geolocation)==null?void 0:G.country)??"",device:Ke(),eventId:n.eventId,partner:n.partner,state:((W=n.geolocation)==null?void 0:W.state)??"",supermarket:o.active.name,url:n.recipe.url,title:((Ae=n.recipe.name)==null?void 0:Ae.replace(/\s+/g," ").trim())??""},D=o.active.products.filter(Ze=>typeof Ze.campaignId=="number");if(D.length){const Ze=D.map(On=>On.campaignId);Object.assign(S,{campaign:JSON.stringify(Ze)})}i.consent.tracking&&vc(S),At({eventAction:"r2b_seller_definido",eventCategory:"Recipe2Basket",eventLabel:o.active.name??null,method:ft(n.gaId),value:0})},[o.active.name,i.consent.tracking,n.eventId,(xe=n.geolocation)==null?void 0:xe.city,(Ee=n.geolocation)==null?void 0:Ee.country,(mt=n.geolocation)==null?void 0:mt.state,n.partner,n.recipe.name,n.recipe.url]);function pe(){var S,D,ee,G;i.consent.tracking&&pr({city:((S=n.geolocation)==null?void 0:S.city)??"",country:((D=n.geolocation)==null?void 0:D.country)??"",device:Ke(),eventId:n.eventId,partner:n.partner,state:((ee=n.geolocation)==null?void 0:ee.state)??"",url:n.recipe.url,supermarket:o.active.name,title:((G=n.recipe.name)==null?void 0:G.replace(/\s+/g," ").trim())??""}),t.onClose()}function Z(){c.push(Bt)}function Je(){c.push(rn)}async function ke(){var G;if(h)return;Ar=new AbortController,m(!0);const S=o.active.products.filter(W=>W._active),D=(G=n==null?void 0:n.recipe)==null?void 0:G.name,ee=await el({cep:s.value,eventId:n.eventId,partner:n.partner,products:S.map(W=>({name:W.name,extId:W.extId,qty:W.count})),supermarket:{customParam:o.active.customParam,id:o.active.id,locationId:o.active.location,seller:o.active.seller,url:o.active.urlSite},utmCampaign:D?D.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/\s+/g,"_"):"",utmContent:"receita",utmMedium:"zaplyshoppableplatform",utmSource:n.utmSource},{signal:Ar.signal});if(!ee){m(!1);return}m(!1),p(ee)}function It(S){var W,Ae,Ze,On;if(o.active.postalcodeRequired&&!s.valid){S.preventDefault(),y.onOpen(),localStorage.setItem("render-toast","true");return}if(h)return;const D=o.active.products.filter(ce=>ce._active);if(!f){u({type:"error",content:"Falha ao adicionar os produtos, tente novamente."});return}const ee={cartPrice:+w.toFixed(2),city:((W=n.geolocation)==null?void 0:W.city)??"",country:((Ae=n.geolocation)==null?void 0:Ae.country)??"",device:Ke(),eventId:n.eventId,partner:n.partner,state:((Ze=n.geolocation)==null?void 0:Ze.state)??"",supermarket:o.active.name,url:n.recipe.url,cep:s.value,title:((On=n.recipe.name)==null?void 0:On.replace(/\s+/g," ").trim())??"",products:o.active.products.filter(ce=>ce._active).map(ce=>({name:ce.name,ingredient:ce.ingredient,ingredientZaply:ce.ingredientZaply,ingredientZaplyId:String(ce.ingredientZaplyId),price:ce.price,quantity:ce.count,isBranded:!!ce.brand,gtin:ce.gtin??null,...ce.brand&&{brand:ce.brand},...ce.secondaryBrand&&{secondaryBrand:ce.secondaryBrand},...ce.tertiaryBrand&&{tertiaryBrand:ce.tertiaryBrand}}))},G=D.filter(ce=>typeof ce.campaignId=="number");if(G.length){const ce=G.map(ui=>ui.campaignId);Object.assign(ee,{products:D.map(ui=>ui.name),campaign:JSON.stringify(ce)})}i.consent.tracking&&$c(ee),At({eventAction:"r2b_carrinho",eventCategory:"Recipe2Basket",eventLabel:o.active.name,method:ft(n.gaId),value:Math.ceil(w)}),At({eventAction:"r2b_produtos_de_marca",eventCategory:"Recipe2Basket",eventLabel:o.active.name,method:ft(n.gaId),value:ge(o.active.products)}),localStorage.removeItem("render-toast"),c.push(zn)}P(()=>{o.active.products&&ke()},[o.active.products]),P(()=>()=>{h&&Ar&&Ar.abort()},[h]);function En(S,D){const ee=o.active.products.map(G=>{if(G.name===S.name){const W=D(G.count);return{...G,_active:W>0,count:W}}return G});r.onChange(G=>G.map(W=>W._id===o.active._id?{...o.active,products:ee}:W))}function Tr(S){En(S,D=>{const ee=D-1;return ee<1?0:ee})}function Rr(S){En(S,D=>D+1)}function Ir(S,D){r.onChange(ee=>ee.map(G=>G._id===o.active._id?{...o.active,products:o.active.products.map(W=>{const Ae=W._id===S._id;return{...W,_active:Ae?D:W._active,count:Ae&&W.count<1?1:W.count}})}:G))}function L(){b(null),v.onClose()}function j(S){b(S),v.onOpen()}function ae(S){if(!g)return;function D(){u({type:"success",content:"Produto alterado com sucesso."}),L()}r.onChange(ee=>ee.map(G=>G._id===o.active._id?{...o.active,products:o.active.products.map(W=>{var Ae;return W._id!==g._id?W:{...S,_active:W._active,count:W.count,swap:(Ae=W.swap)==null?void 0:Ae.map(Ze=>{if(Ze._id!==S._id)return Ze;const{swap:On,...ce}=g;return{...ce,count:Ze.count}})}})}:G),D)}function Q(S){const D=Be();a.change(S,()=>{i.consent.postalCode&&D.set(ee=>({...ee,postalCode:S}))})}return P(()=>{s.valid&&y.isOpen&&(async()=>{const D=await tl({postalcode:s.value,supermarketId:o.active.id});if(!(D!=null&&D.isValid)){y.onClose(),c.push(st);return}ke()})()},[s.valid,y.isOpen,o]),Ie(()=>{var S;y.isOpen&&((S=l.current)==null||S.focus())},[y.isOpen]),P(()=>{e&&!y.isOpen&&u({type:"warning",onClose:()=>localStorage.removeItem("render-toast"),content:"O lojista escolhido não atende o CEP informado. Selecione um dos lojistas disponíveis para continuar."})},[]),d(Ym,{onClickCloseBtn:pe,onClickSettingsBtn:Z,onClickCheckoutBtn:It,onClickLocationBtn:Je,onDecrementProduct:Tr,onIncrementProduct:Rr,onToggleActive:Ir,onCloseSwapper:L,onOpenSwapper:j,onSwapProduct:ae,onChangePostalCode:Q,postalCodeValue:s.value,open:y.isOpen,isSwapperOpen:v.isOpen,swapperProduct:g,checkoutUrl:f,isFetchingCheckoutUrl:h,disabledCheckoutBtn:ie,slideTrackWidth:fe(),locationLabel:C,cartPrice:w,active:o.active,list:o.list})}const Q0=we(Y0);function eb(){const e=We(),t=vt(),n=wt(),r=Eo(),o=ze(),i=te(()=>({geolocation:t.geolocation,recipeUrl:t.recipe.url,postalCode:n.value}),[t.geolocation,t.recipe.url,n.value]),{data:a,status:s}=wf(i);P(()=>{if(s==="rejected")r.onClear(()=>o.push(Jr));else if(s==="resolved"){const u=!a.length,l=a.length===1;if(u){r.onClear(()=>o.push(Zr));return}const f=l?Dn:Bn;r.onSet(a,()=>o.push(f))}},[a,s,r,o]);function c(){e.onClose()}return d(Tc,{title:"Estamos verificando os varejistas que entregam na sua região.",text:"Por favor, aguarde!",onClose:c})}const tb=we(eb);function nb(){var f,p,h;const e=We(),t=vt(),n=gn(),r=wt(),o=xt(),i=ze(),a=I(null);Ie(()=>{var m;(m=a.current)==null||m.focus()},[]),P(()=>{var m,g,b,v;o.consent.tracking&&Em({city:((m=t.geolocation)==null?void 0:m.city)??"",country:((g=t.geolocation)==null?void 0:g.country)??"",device:Ke(),eventId:t.eventId,partner:t.partner,state:((b=t.geolocation)==null?void 0:b.state)??"",url:t.recipe.url,title:((v=t.recipe.name)==null?void 0:v.replace(/\s+/g," ").trim())??""})},[o.consent.tracking,t.eventId,(f=t.geolocation)==null?void 0:f.city,(p=t.geolocation)==null?void 0:p.country,(h=t.geolocation)==null?void 0:h.state,t.partner,t.recipe.url,t.recipe.name]);function s(){r.valid&&i.push(st)}function c(m){const g=Be();localStorage.removeItem("render-toast"),n.change(m,()=>{o.consent.postalCode&&g.set(b=>({...b,postalCode:m}))})}function u(){i.push(Bt)}function l(){var m,g,b,v;o.consent.tracking&&pr({city:((m=t.geolocation)==null?void 0:m.city)??"",country:((g=t.geolocation)==null?void 0:g.country)??"",device:Ke(),eventId:t.eventId,partner:t.partner,state:((b=t.geolocation)==null?void 0:b.state)??"",url:t.recipe.url,title:((v=t.recipe.name)==null?void 0:v.replace(/\s+/g," ").trim())??""}),e.onClose()}return d(qm,{hideSettingsBtn:!0,postalCode:r.value,postalCodeRef:a,utmCampaign:t.utmCampaign,utmSource:t.utmSource,disabledPostalCodeBtn:!r.valid,onChangePostalCode:c,onOpenSettings:u,onCloseWidget:l,onSubmit:s})}const rb=we(nb);function ob(){const e=We(),t=vt(),n=xt(),r=gn(),o=ze();function i(){e.onClose()}function a(){const s=Be();r.change("",()=>{n.consent.postalCode&&s.set(c=>({...c,postalCode:""})),o.push(st)})}return d(Om,{headerText:"Varejistas encontrados",headingText:"Houve uma falha inesperada ao buscar os varejistas na sua região.",subheadingText:"Tente novamente pressionando o botão abaixo:",buttonText:"Tentar novamente",utmCampaign:t.utmCampaign,utmSource:t.utmSource,onClose:i,onClick:a})}const ib=we(ob);function ab(){const e=We(),t=vt(),n=mf(),r=xt(),o=wt(),i=$n(),a=ze(),s=Ro();function c(){a.back()}function u(){var h,m,g,b;if(r.consent.tracking){const v={city:((h=t.geolocation)==null?void 0:h.city)??"",country:((m=t.geolocation)==null?void 0:m.country)??"",device:Ke(),eventId:t.eventId,partner:t.partner,state:((g=t.geolocation)==null?void 0:g.state)??"",url:t.recipe.url,title:((b=t.recipe.name)==null?void 0:b.replace(/\s+/g," ").trim())??""};i.active&&Object.assign(v,{supermarket:i.active.name}),pr(v)}e.onClose()}function l(h){const m=Mt(),g=Be();n.onChangePostalCodeConsent(h,()=>{m.set(b=>({...b,postalCode:h})),g.set(b=>({...b,postalCode:h?o.value:""})),s({type:"success",content:`Salvar meu código postal: ${h?"Ativado":"Desativado"} com sucesso.`})})}function f(h){const m=Mt(),g=Be();n.onChangeTrackingConsent(h,()=>{m.set(b=>({...b,tracking:h})),g.set(b=>({...b,eventId:h?t.eventId:""})),s({type:"success",content:`Coleta de dados: ${h?"Ativada":"Desativada"} com sucesso.`})})}function p(){const h=Be();s({type:"success",content:"Dados deletados com sucesso.",onOpen:()=>{h.set(m=>({...m,eventId:"",postalCode:""}))}})}return d(Zg,{onClickBackBtn:c,onClickCloseBtn:u,onChangePostalCodeConsent:l,onChangeTrackingConsent:f,onDeleteData:p,postalCodeConsent:r.consent.postalCode,trackingConsent:r.consent.tracking})}const sb=we(ab);function cb(){const e=ze(),t=We();function n(){e.index()}function r(){t.onClose()}return d(Km,{onClickTryAgain:n,onCloseWidget:r})}const lb=we(cb);function ub(){const e=We(),t=$n(),n=t.active.name,r=t.active.urlLogo,o=t.active.products.filter(a=>a._active).length;function i(){e.onClose()}return d(Yg,{onCloseWidget:i,productsQuantity:o,retailerLogo:r,retailerName:n})}const db=we(ub),fb=[{key:ha,path:ha,index:!0,component:d(t0,{})},{key:rn,path:rn,component:d(i0,{})},{key:Dn,path:Dn,component:d(s0,{})},{key:Bn,path:Bn,component:d(Q0,{})},{key:st,path:st,component:d(tb,{})},{key:Zr,path:Zr,component:d(rb,{})},{key:Jr,path:Jr,component:d(ib,{})},{key:Bt,path:Bt,component:d(sb,{})},{key:ct,path:ct,component:d(lb,{})},{key:zn,path:zn,component:d(db,{})}],pb=()=>d(Y,{children:fb.map(({key:e,...t})=>d(tf,{...t},e))}),hb=_o({".r2b":{color:"$gray800",lineHeight:"$base",fontWeight:"$normal",fontFamily:"$body",fontSize:"$md",fontSynthesis:"none",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale",textSizeAdjust:"100%",touchAction:"manipulation",userSelect:"none","& > [data-aria-hidden], & > [aria-hidden]":{display:"initial"},"& *":{margin:0},"& *, & ::before, & ::after":{boxSizing:"border-box",wordWrap:"break-word"},"& :focus":{outlineColor:"transparent !important"},"& :focus-visible":{outlineColor:"$gray900 !important",outlineOffset:"1px !important",outlineStyle:"solid !important",outlineWidth:"2px !important"},"& ::-webkit-scrollbar":{width:"16px",backgroundColor:"transparent"},"& ::-webkit-scrollbar-thumb":{height:"56px",borderRadius:"8px",border:"4px solid transparent",backgroundClip:"content-box",backgroundColor:"#ababab"},"& .glide":{position:"relative",width:"100%","box-sizing":"border-box"},"& .glide *":{"box-sizing":"inherit"},"& .glide__track":{overflow:"hidden"},"& .glide__slides":{position:"relative",width:"100%","list-style":"none","backface-visibility":"hidden","transform-style":"preserve-3d","touch-action":"pan-Y",overflow:"hidden",margin:"0",padding:"0","white-space":"nowrap",display:"flex","flex-wrap":"nowrap","will-change":"transform"},"& .glide__slides--dragging":{"user-select":"none"},"& .glide__slide":{width:"100%",height:"100%","flex-shrink":"0","white-space":"normal","user-select":"none","-webkit-touch-callout":"none","-webkit-tap-highlight-color":"transparent"},"& .glide__slide a":{"user-select":"none","-webkit-user-drag":"none","-moz-user-select":"none","-ms-user-select":"none"},"& .glide__arrows":{"-webkit-touch-callout":"none","user-select":"none"},"& .glide__arrow":{position:"unset",transform:"unset",filter:"unset"},"& .glide__arrow:hover":{filter:"unset"},"& .glide__bullets":{"-webkit-touch-callout":"none","user-select":"none"},"& .glide--rtl":{direction:"rtl"}},".r2b--open, .r2b--open body":{overflow:"hidden !important"}});function mb(e){return gb(),d(Ip,{children:d(wm,{...e,children:d(pb,{})})})}function gb(){hb()}function bb(e){const{children:t,onClose:n,value:r}=e;function o(){}return vb(),d(vd,{onClose:n,value:r,children:({isOpen:i,onClose:a,onOpen:s})=>d(Y,{children:[i&&d(rf,{children:d(mb,{container:r.container,onClose:a})}),!!t&&t({onLoad:o,onOpen:s})]})})}function vb(){Xd(),Gd()}const $b=z("button",{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative",margin:0,fontWeight:"$semibold",lineHeight:"$shorter",border:"none",outline:"transparent solid 2px",outlineOffset:"1px",transitionDuration:"$transitions$fast",transitionProperty:"background-color, background-position, color, transform",transitionTimingFunction:"ease-in-out",verticalAlign:"middle",textTransform:"none",overflow:"visible",whiteSpace:"nowrap",userSelect:"none",appearance:"none"});function hl({children:e,container:t}){return Hr(e,t||document.body)}const yb="https://southamerica-east1-recipe2basket.cloudfunctions.net",_b=qa.create({baseURL:yb});async function wb(e){const{data:t,error:n}=await Lt(_b.get("/geolocation"));if(!t||n)return de(()=>{tt("Failed to get geolocation data")}),null;const{city:r,country:o,region:i,...a}=t.data;return{city:r,country:o,state:i,...e!=null&&e.raw?a:{}}}function xb(e){Object.assign(window,{__RECIPE2BASKET__:{widget:e.widget,url:e.url}})}const Cb=(e,t)=>{const n=e.filter(i=>typeof i.pathname=="string"?t.host===i.host&&t.pathname.startsWith(i.pathname):t.host===i.host);if(!n.length)return de(()=>{De("This blog has not yet been mapped.","findBlog")}),null;const r=n.map(i=>{if("button"in i){const{selector:a,...s}=i.button,c=Array.from(document.querySelectorAll(a));return{...i,button:{...s,containers:c}}}return i}).filter(i=>"button"in i?!!i.button.containers.length:!0);if(!r.length)return de(()=>{De("A button container with the given selector was not found.","findBlog")}),null;if(r.length===1)return r[0];const[o]=[...r].sort((i,a)=>(a.priority??0)-(i.priority??0));return o},Sb=(e,t=new URL(window.location.href))=>{xb({widget:e,url:t});const{abTestId:n="",defaultIsOpen:r=!1,blogs:o,gaId:i="",...a}=e,s=Cb(o??[],t);return{...a,abTestId:n,blog:s,campaign:"",container:null,defaultIsOpen:r,eventId:(()=>{const u=Mt(),l=Be(),f=Ss();try{const p=l.get();if(p.eventId&&kf(p.eventId))return p.eventId;u.get().tracking&&l.set(h=>({...h,eventId:f}))}catch{de(()=>{De("The eventId was not found in localStorage","createBlog")})}return f})(),gaId:i,geolocation:null,hasCoupon:!1,isApp:!1}};function kb(e,t){const n=document.querySelector(t);if(n)return n;const r=document.createElement("div");return r.classList.add(e),r}function ml(e,t,n){if(e.mode==="inside-start"){t.insertAdjacentElement("afterbegin",n);return}if(e.mode==="inside-end"){t.insertAdjacentElement("beforeend",n);return}if(e.mode==="before"){t.insertAdjacentElement("beforebegin",n);return}t.insertAdjacentElement("afterend",n)}function Eb(e,t){if(t in e)return e[t]()}function Ob(e,t){if(t in e)return e[t]}function Pb(e){return{$$bg:e.background.normal,$$bgHover:e.background.hover,$$bgActive:e.background.active,$$color:e.color.normal,$$colorHover:e.color.hover,$$colorActive:e.color.active}}async function Ab(){const e=new URL(window.location.href),t=Mn(e,"r2b_city"),n=Mn(e,"r2b_country"),r=Mn(e,"r2b_state");return[!!t,!!n,!!r,isNaN(Number(t)),isNaN(Number(n)),isNaN(Number(r))].every(Boolean)?{city:t,country:n,state:r}:await wb()}function Tb(e){const{children:t,append:n,className:r,containers:o,selector:i}=e,a=n.all?[...o]:[o[0]],s=kb(r,i);return a.length===1?(ml(n,a[0],s),d(hl,{container:s,children:t})):d(Y,{children:o.map((c,u)=>(ml(n,c,s),d(hl,{children:t},u)))})}var Jt=(e=>(e[e.MAIN=0]="MAIN",e))(Jt||{});const Rb=_t({boxSizing:"border-box",width:"$full"});function Ib(e){return Eb({[Jt.MAIN]:Rb},e)}const Nb=z($b,{width:"$full",height:"56px",minWidth:"40px",minHeight:"56px",paddingInlineStart:"$4",paddingInlineEnd:"$4",borderRadius:"$pill",fontSize:"$md",fontWeight:"$normal",transitionDuration:"$transitions$slow"}),Db=z(Nb,{background:"$$bg",color:"$$color","&:hover":{background:"$$bgHover",color:"$$colorHover",border:"1px solid $$colorHover"},"&:active":{background:"$$bgActive",color:"$$colorActive",border:"1px solid $$colorActive"}});function Bb(e){const{onClick:t,onLoad:n,classNames:r,theme:o}=e;return P(()=>{n()},[n]),d(Db,{onClick:t,className:ye(...r),css:Pb(o),children:[d(zb,{}),"Comprar ingredientes"]})}function zb(){return d(N,{as:ap,size:"em",css:{mie:"$2","@md":{mie:"$4"},fontSize:"$xl","@lg":{fontSize:"$3xl"}}})}function Fb(e){return Ob({[Jt.MAIN]:Bb},e)}const li={main:{background:{normal:"#AA0C35",active:"#FFFFFF",hover:"#FFFFFF"},color:{normal:"#FFFFFF",active:"#AA0C35",hover:"#AA0C35"}}},Lb=()=>{var e;return Sb({blogs:[{id:Jt.MAIN,button:{append:{all:!1,mode:"inside-end"},classNames:["r2b-recipe-button"],selector:".btn-zapply-buy-now",theme:li.main},host:"dev-dig0026141-food-multibrand-brazil.pantheonsite.io",pathname:"/receitas"},{id:Jt.MAIN,button:{append:{all:!1,mode:"inside-end"},classNames:["r2b-recipe-button"],selector:".btn-zapply-buy-now",theme:li.main},host:"live-dig0026141-food-multibrand-brazil.pantheonsite.io",pathname:"/receitas"},{id:Jt.MAIN,button:{append:{all:!1,mode:"inside-end"},classNames:["r2b-recipe-button"],selector:".btn-zapply-buy-now",theme:li.main},host:"www.receitasnestle.com.br",pathname:"/receitas"}],gaId:"G-M96D9E42G5",partner:window.location.host,recipe:{name:(e=document.querySelector("h1"))==null?void 0:e.innerText,url:window.location.origin+window.location.pathname},utmCampaign:window.location.origin+window.location.pathname,utmSource:"receitasnestle"})};async function Mb(){const{blog:e,...t}=Lb();if(!e||!("button"in e))return;const n=await Ab(),r=await ud({geolocation:n,partner:t.partner,recipeUrl:t.recipe.url});if(!(r!=null&&r.enableButton)){de(()=>{De("This blog is currently disabled.")});return}const o=document.createElement("div");o.classList.add("r2b");const i=Fl(o),a=$d({...t,campaign:r.campaign??"",container:o,geolocation:n,hasCoupon:!!r.coupons.length}),s=Ib(e.id);if(!s){de(()=>{De("Failed to get btn container by blog ID.")});return}const c=Fb(e.id);if(!c){de(()=>{De("Failed to get btn by blog ID.")});return}i.render(d(qr,{children:d(bb,{value:a,children:({onLoad:u,onOpen:l})=>d(Tb,{append:e.button.append,className:s.className,containers:e.button.containers,selector:s.selector,children:d(c,{theme:e.button.theme,classNames:e.button.classNames,onClick:l,onLoad:u})})})})),document.body.appendChild(o)}function Wb(){Mb()}Wb()})();