PageSourceSearch

https://netconv.com/packs/js/65238-728062c5e7e001bbd9c7.js

js netconv.com collected 2026-10-04 02:50:19 UTC 14,039 bytes, 3 lines download raw bytes

1/*! For license information please see 65238-728062c5e7e001bbd9c7.js.LICENSE.txt */
2"use strict";(self.webpackChunknetconv=self.webpackChunknetconv||[]).push([[65238],{76662:function(e,t,n){n.d(t,{A:function(){return c}});var r=n(96540),a=n(84976),o=n(85667),i=n(96473);function c(){var e=(0,o.CA)(),t=(0,i.A)().text;return r.createElement("footer",{className:"sf-footer"},r.createElement("div",{className:"sf-container sf-footer-inner"},r.createElement("div",null,r.createElement("strong",null,e.name),r.createElement("p",null,[e.city,e.state].filter(Boolean).join(", "))),r.createElement("nav",{"aria-label":t("Informa\xe7\xf5es da loja","Store information")},r.createElement(a.N_,{to:"/about"},t("Sobre a loja","About the store")),e.phone&&r.createElement("a",{href:"tel:"+e.phone.replace(/[^+\d]/g,"")},e.phone),e.whatsappPhoneNumber&&r.createElement("a",{href:"https://wa.me/"+e.whatsappPhoneNumber.replace(/\D/g,"")},"WhatsApp")),r.createElement("p",null,"\xa9 ",(new Date).getFullYear()," ",e.name)))}},33283:function(e,t,n){n.d(t,{A:function(){return u}});var r=n(96540),a=n(84976),o=n(85667),i=n(57893),c=n(98376),l=n(96473);function u(){var e=(0,o.CA)(),t=(0,i._$)(),n=(0,c.O)(),u=(0,l.A)().text;return r.createElement("header",{className:"sf-header"},r.createElement("a",{className:"sf-skip",href:"#storefront-main"},u("Ir ao conte\xfado","Skip to content")),r.createElement("nav",{className:"sf-container sf-nav","aria-label":u("Loja","Store")},r.createElement(a.N_,{className:"sf-brand",to:"/"},e.logoUrl&&r.createElement("img",{src:e.logoUrl,alt:"",width:"48",height:"48"}),r.createElement("span",null,e.name)),r.createElement("div",{className:"sf-nav-links"},r.createElement(a.N_,{to:"/catalog"},u("Produtos","Products")),r.createElement(a.N_,{to:"/recipes"},u("Receitas","Recipes")),r.createElement(a.N_,{to:"/account"},u("Minha conta","My account")),n.account&&r.createElement(a.N_,{to:"/loyalty"},u("Benef\xedcios","Rewards")),r.createElement(a.N_,{className:"sf-cart-link",to:"/cart","aria-label":u("Carrinho","Cart")},u("Carrinho","Cart")," ",r.createElement("span",null,t.summary.item_count))),r.createElement("form",{className:"sf-header-search",action:"/"+e.slug+"/catalog",role:"search"},r.createElement("label",{className:"sf-sr-only",htmlFor:"storefront-search"},u("Buscar produtos","Search products")),r.createElement("input",{id:"storefront-search",name:"q",type:"search",placeholder:u("O que voc\xea procura?","What are you looking for?")}),r.createElement("button",{type:"submit"},u("Buscar","Search")))))}},98376:function(e,t,n){n.d(t,{O:function(){return c}});var r=n(96540),a=n(85667),o=3e5,i="storefront_user_token";function c(e){var t=(e||{}).orderToken||null,n=(0,a.CA)(),c=(0,r.useState)({account:null,config:null,pendingCoupons:[],milestoneCoupons:[],freshMilestoneCoupons:[],transactions:[],loading:!0,error:null}),l=c[0],u=c[1];return(0,r.useEffect)(function(){var e=function(){try{return window.localStorage.getItem(i)}catch(e){return null}}();if(n.slug&&e){var t=!1;return fetch("/"+n.slug+"/api/v1/loyalty",{method:"GET",credentials:"include",headers:{Accept:"application/json",Authorization:"Bearer "+e}}).then(function(e){if(401===e.status||403===e.status)return t||u(function(e){return Object.assign({},e,{loading:!1})}),null;if(!e.ok)throw new Error("loyalty_fetch_failed:"+e.status);return e.json()}).then(function(e){if(e&&!t){var n=e.milestone_coupons||[],r=Date.now(),a=n.filter(function(e){var t=e.created_at?new Date(e.created_at).getTime():0;return r-t<o});u({account:e.account||null,config:e.config||null,pendingCoupons:e.pending_coupons||[],milestoneCoupons:n,freshMilestoneCoupons:a,transactions:e.transactions||[],loading:!1,error:null})}}).catch(function(e){t||u(function(t){return Object.assign({},t,{loading:!1,error:e.message})})}),function(){t=!0}}u(function(e){return Object.assign({},e,{loading:!1})})},[n.slug,t]),l}},96473:function(e,t,n){n.d(t,{A:function(){return a}});var r=n(85667);function a(){var e=(0,r.CA)(),t=e.locale||("USD"===e.currency?"en-US":"pt-BR");return{locale:t,text:function(e,n){return t.startsWith("pt")?e:n},money:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.currency||"BRL";return new Intl.NumberFormat(t,{style:"currency",currency:r}).format(Number(n)||0)}}}},65238:function(e,t,n){n.r(t),n.d(t,{default:function(){return E}});var r=n(96540),a=n(84976),o=n(47767),i=n(85667),c=n(57893),l=n(33283),u=n(76662);function s(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function o(n,r,a,o){var l=r&&r.prototype instanceof c?r:c,u=Object.create(l.prototype);return f(u,"_invoke",function(n,r,a){var o,c,l,u=0,s=a||[],f=!1,p={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return o=t,c=0,l=e,p.n=n,i}};function m(n,r){for(c=n,l=r,t=0;!f&&u&&!a&&t<s.length;t++){var a,o=s[t],m=p.p,d=o[2];n>3?(a=d===r)&&(l=o[(c=o[4])?5:(c=3,3)],o[4]=o[5]=e):o[0]<=m&&((a=n<2&&m<
2o[1])?(c=0,p.v=r,p.n=o[1]):m<d&&(a=n<3||o[0]>r||r>d)&&(o[4]=n,o[5]=r,p.n=d,c=0))}if(a||n>1)return i;throw f=!0,r}return function(a,s,d){if(u>1)throw TypeError("Generator is already running");for(f&&1===s&&m(s,d),c=s,l=d;(t=c<2?e:l)||!f;){o||(c?c<3?(c>1&&(p.n=-1),m(c,l)):p.n=l:p.v=l);try{if(u=2,o){if(c||(a="next"),t=o[a]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,c<2&&(c=0)}else 1===c&&(t=o.return)&&t.call(o),c<2&&(l=TypeError("The iterator does not provide a '"+a+"' method"),c=1);o=e}else if((t=(f=p.n<0)?l:n.call(r,p))!==i)break}catch(t){o=e,c=1,l=t}finally{u=1}}return{value:t,done:f}}}(n,a,o),!0),u}var i={};function c(){}function l(){}function u(){}t=Object.getPrototypeOf;var p=[][r]?t(t([][r]())):(f(t={},r,function(){return this}),t),m=u.prototype=c.prototype=Object.create(p);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,f(e,a,"GeneratorFunction")),e.prototype=Object.create(m),e}return l.prototype=u,f(m,"constructor",u),f(u,"constructor",l),l.displayName="GeneratorFunction",f(u,a,"GeneratorFunction"),f(m),f(m,a,"Generator"),f(m,r,function(){return this}),f(m,"toString",function(){return"[object Generator]"}),(s=function(){return{w:o,m:d}})()}function f(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}f=function(e,t,n,r){function o(t,n){f(e,t,function(e){return this._invoke(t,n,e)})}t?a?a(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},f(e,t,n,r)}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function d(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e,t,n,r,a,o,i){try{var c=e[o](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,a)}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var b=["measurement_unsupported","measurement_incompatible","commercial_presentation_unavailable"],y=function(e){var t,n;return Boolean(e.product_id&&e.product)&&(!1!==(null===(t=e.availability)||void 0===t?void 0:t.purchasable)||b.includes(null===(n=e.availability)||void 0===n?void 0:n.reason_code))};function E(){var e=(0,o.g)().id,t=(0,i.CA)(),n=(0,c._$)(),f=(0,o.Zp)(),p=g((0,r.useState)({loading:!0,recipe:null,error:null}),2),h=p[0],b=p[1],E=g((0,r.useState)({}),2),_=E[0],j=E[1],w=g((0,r.useState)({}),2),S=w[0],O=w[1],N=g((0,r.useState)(!1),2),k=N[0],A=N[1],C=g((0,r.useState)(null),2),P=C[0],I=C[1],T=g((0,r.useState)(0),2),U=T[0],x=T[1];(0,r.useEffect)(function(){var n=new AbortController;return b({loading:!0,recipe:null,error:null}),fetch("/".concat(t.slug,"/api/v1/recipes/").concat(encodeURIComponent(e)),{signal:n.signal}).then(function(e){if(!e.ok)throw new Error("recipe_unavailable");return e.json()}).then(function(e){n.signal.aborted||b({loading:!1,recipe:e.recipe,error:null})}).catch(function(e){n.signal.aborted||b({loading:!1,recipe:null,error:e})}),function(){return n.abort()}},[t.slug,e,U]);var B=h.recipe,R=(null===B||void 0===B?void 0:B.ingredients)||(null===B||void 0===B?void 0:B.recipe_products)||[],D=function(){var r,a=(r=s().m(function r(){var a,o,i,c,l;return s().w(function(r){for(;;)switch(r.p=r.n){case 0:if((a=R.filter(function(e){return y(e)&&!1!==_[e.id]}).map(function(e){var t;return m({recipe_product_id:e.recipe_product_id||e.id,product_id:e.product_id},"calculated"===(null===(t=e.purchase_plan)||void 0===t?void 0:t.status)?{}:{package_units:Number(S[e.id])})})).length){r.n=1;break}return I("Selecione um ingrediente com SKU para comprar."),r.a(2);case 1:if(!a.some(function(e){return"package_units"in e&&(!Number.isInteger(e.package_units)||e.package_units<1)})){r.n=2;break}return I("Informe a quantidade de embalagens para os ingredientes sem convers\xe3o."),r.a(2);case 2:return A(!0),I(null),r.p=3,r.n=4,fetch("/".concat(t.slug,"/api/v1/recipes/").concat(encodeURIComponent(e),"/cart_quote"),{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({recipe_cart:{ingredients:a,existing_items:n.items.map(function(e){return{product_id:e.product_id,quantity:e.quantity}})}})});case 4:return i=r.v,r.n=5,i.json();case 5:if(c=r.v,i.ok&&Array.isArray(c.groups)){r.n=6;break}throw new Error((null===(o=c.errors)||void 0===o?void 0:o[0])||"Sele\xe7\xe3o indispon\xedvel. Atualize a receita.");case 6:n.addRecipeSelection(c),f("/cart"),r.n=8;break;case 7:r.p=7,l=r.v,I(l.message||"N\xe3o foi poss\xedvel conferir a sele\xe7\xe3o.");case 8:return r.p=8,A(!1),r.f(8);case 9:return r.a(2)}},r,null,[[3,7,8,9]])}),function(){var e=this,t=arguments;return new Promise(function(n,a){var o=r.apply(e,t);function i(e){v(o,n,a,i,c,"next",e)}function c(e){v(o,n,a,i,c,"throw",e)}i(void 0)})});return function(){return a.apply(this,arguments)}}();return r.createElement("div",{className:"sf-page"},r.createElement(l.A,null),r.createElement("main",{id:"storefront-main",tabIndex:"-1",className:"sf-container sf-main sf-recipe-detail"},r.createElement(a.N_,{to:"/recipes"},"\u2190 Receitas"),h.loading?r.createElement("p",{role:"status"},"Carregando receita\u2026"):null,h.error?r.createElement("div",{role:"alert"},r.createElement("p",null,"Receita indispon\xedvel nesta loja."),r.createElement("button",{onClick:function(){return x(function(e){return e+1})}},"Tentar novamente")):null,B?r.createElement(r.Fragment,null,r.createElement("h1",null,B.title),B.description?r.createElement("p",null,B.description):null,r.createElement("h2",null,"Ingredientes"),r.createElement("div",{className:"sf-recipe-ingredients"},R.map(function(e){var t,n,a=Boolean(e.product_id&&e.product),o=y(e),i="calculated"!==(null===(t=e.purchase_plan)||void 0===t?void 0:t.status),c=e.ingredient_name||e.description||"Ingrediente";return r.createElement("section",{className:"sf-recipe-ingredient",ke
2y:e.id||e.recipe_product_id},r.createElement("h3",null,c),r.createElement("p",null,[e.amount,e.unit_name||e.culinary_unit].filter(Boolean).join(" ")),a?r.createElement(r.Fragment,null,r.createElement("p",null,"SKU: ",e.product.name),null!==(n=e.commercial_presentation)&&void 0!==n&&n.label?r.createElement("p",null,"Embalagem: ",e.commercial_presentation.label):null,o?null:r.createElement("p",null,"SKU indispon\xedvel nesta loja no momento."),o?r.createElement("label",{className:"sf-recipe-check"},r.createElement("input",{type:"checkbox",checked:!1===_[e.id],onChange:function(t){return j(function(n){return m(m({},n),{},d({},e.id,!t.target.checked))})}})," J\xe1 tenho em casa"):null,o&&!1!==_[e.id]&&i?r.createElement("label",null,"Embalagens para comprar",r.createElement("input",{type:"number",min:"1",step:"1",inputMode:"numeric",value:S[e.id]||"",onChange:function(t){return O(function(n){return m(m({},n),{},d({},e.id,t.target.value))})}})):null,o&&!1!==_[e.id]&&!i?r.createElement("p",null,"As embalagens ser\xe3o calculadas por SKU ao adicionar ao carrinho."):null):r.createElement("p",null,"Sem SKU associado. Este ingrediente \xe9 apenas informativo."))})),P?r.createElement("p",{role:"alert"},P):null,r.createElement("button",{className:"sf-button",disabled:k,onClick:D},k?"Conferindo\u2026":"Adicionar ingredientes ao carrinho")):null),r.createElement(u.A,null))}}}]);
3//# sourceMappingURL=65238-728062c5e7e001bbd9c7.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.