"use strict";(()=>{(self.webpackChunkpanels=self.webpackChunkpanels||[]).push([[792],{7133:(v,S,n)=>{var d=n(9289),p=(o,t,e)=>new Promise((r,c)=>{var u=i=>{try{m(e.next(i))}catch(A){c(A)}},N=i=>{try{m(e.throw(i))}catch(A){c(A)}},m=i=>i.done?r(i.value):Promise.resolve(i.value).then(u,N);m((e=e.apply(o,t)).next())});const _=(o,t)=>p(void 0,null,function*(){const e=document.getElementsByTagName(t),r=document.createRange();r.selectNode(e[0]);const c=yield fetch(`${d.K.BASE_URL}/${d.K.SITEFOLDER}/${o}`);if(c.ok)try{const u=yield c.text(),N=r.createContextualFragment(u);e[0].appendChild(N)}catch(u){console.log("error:",u)}});var L=n(8008),P=(o,t,e)=>new Promise((r,c)=>{var u=i=>{try{m(e.next(i))}catch(A){c(A)}},N=i=>{try{m(e.throw(i))}catch(A){c(A)}},m=i=>i.done?r(i.value):Promise.resolve(i.value).then(u,N);m((e=e.apply(o,t)).next())});const f=o=>P(void 0,null,function*(){const t=document.querySelector(o);if(t){const e=document.createElement("div");e.setAttribute("class","rec-add-to-cart-modal"),t.appendChild(e),(yield Promise.all([n.e(198),n.e(843),n.e(555),n.e(984),n.e(584)]).then(n.bind(n,1642))).renderModal(e)}}),I=()=>{window&&(window.ikeaRecommendations={})},s=()=>P(void 0,null,function*(){I(),l(),d.K.ENABLE_CART_RECOMMENDATIONS&&f("body"),d.K.ENABLE_PANELS&&(Array.from(document.getElementsByTagName("script")).some(e=>e.src.includes("price-package"))||(_("products/price-package-scripts.html","body"),_("products/price-package-styles.html","head")),yield(yield Promise.all([n.e(198),n.e(843),n.e(555),n.e(956),n.e(984),n.e(258)]).then(n.bind(n,315))).initPanels())}),l=()=>P(void 0,null,function*(){let t=new URL(window.location.href).searchParams.get("rec-product");if(t){const e=document.querySelector("[data-rec-current-product]");if(t[0]!=="s"&&t[1]==="9"&&(t="s"+t),e){const r=yield(0,L.h)(t);e.innerHTML=r||""}}}),a=s;(()=>{try{window.addEventListener("DOMContentLoaded",()=>{a()})}catch(o){console.error(o)}})()},8008:(v,S,n)=>{n.d(S,{N:()=>f,h:()=>I});var d=n(9289),p=(s,l,a)=>new Promise((E,o)=>{var t=c=>{try{r(a.next(c))}catch(u){o(u)}},e=c=>{try{r(a.throw(c))}catch(u){o(u)}},r=c=>c.done?E(c.value):Promise.resolve(c.value).then(t,e);r((a=a.apply(s,l)).next())});const _=s=>`${d.K.BASE_URL}/${d.K.SITEFOLDER}/products/${s.substring(s.length-3)}/${s}-compact-fragment.html`,L=s=>{const E=new DOMParser().parseFromString(s,"text/html").querySelector("body > *");if(E&&E.className==="product-missing")throw new Error("Product missing");if(E&&E.innerHTML)return E.outerHTML;throw new Error("Product missing")},P=s=>p(void 0,null,function*(){try{const l=yield fetch(s,{mode:"cors"}).then(a=>a.text());return L(l)}catch(l){return}}),f=s=>p(void 0,null,function*(){return Promise.all(s.map(l=>p(void 0,[l],function*({itemId:a,type:E,availability:o,profitability:t,salessteering:e}){const r=yield P(_(a));return{itemId:a,type:E,fragment:r,availability:o,profitability:t,salesSteering:e}}))).then(l=>l.filter(a=>a.fragment))}),I=s=>p(void 0,null,function*(){return yield P(_(s))})},9289:(v,S,n)=>{n.d(S,{K:()=>o});var d=Object.defineProperty,p=Object.defineProperties,_=Object.getOwnPropertyDescriptors,L=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,I=(t,e,r)=>e in t?d(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,s=(t,e)=>{for(var r in e||(e={}))P.call(e,r)&&I(t,r,e[r]);if(L)for(var r of L(e))f.call(e,r)&&I(t,r,e[r]);return t},l=(t,e)=>p(t,_(e)),a;const o=l(s({},{BASE_URL:"https://www.ikea.com",LOCALE:"es-MX",SITEFOLDER:"mx/es",K8S_CLUSTER_API_KEY:"70fa10e3-43b4-4ee8-b129-5600a2aa9352",K8S_CLUSTER_API_URL:"https://v4.ai.ingka.ikea.net/api/recommendations",RECS_OPTIMIZELY_SDK_KEY:"8hr89wMDrZvcMQFojb8HE",CROSS_TEAM_OPTIMIZELY_SDK_KEY:"8g3vq1fGmjTFBVEY4qoP4"}),{CART_PAGE_URL:"https://www.ikea.com/mx/es/cart/",COUNTRY:(a="mx/es")==null?void 0:a.split("/")[0],DISABLE_PANEL_FOR_YOU:"MISSING_ENV_VAR".DISABLE_PANEL_FOR_YOU==="true",DISABLE_PANEL_STYLE:!1,DISABLE_SHOPPINGCART_EVENT_TRACKING:!0,ENABLE_SECOND_CART_PANEL:"MISSING_ENV_VAR".ENABLE_SECOND_CART_PANEL==="true",ENABLE_CART_RECOMMENDATIONS:!0,ENABLE_PANELS:!0,ENABLE_PLP_TOP:"MISSING_ENV_VAR".ENABLE_PLP_TOP==="true",ENABLE_RECENTLY_VIEWED_SPA_LINK:!0,LANG_DIR:"MISSING_ENV_VAR".LANG_DIR||"ltr",NODE_ENV:"production",SHOPPINGLIST_PAGE_URL:"https://www.ikea.com/mx/es/favourites/",SUPPORTS_POSTAL_CODE:"MISSING_ENV_VAR".SUPPORTS_POSTAL_CODE==="true",VIEW_PIP_CONTAINER_BOTTOM_PANELS:"pip-container-second,pip-container-third",VIEW_PIP_PRODUCT_BOTTOM_PANELS:"pip-product-first,pip-product-second,pip-product-third",SIK_SEARCH_API_URL:"MISSING_ENV_VAR".SIK_SEARCH_API_URL||"",LIVLIG_BASE_URL:"https://item-sales.livlig.ingka.com",VALIDATE_ZIP_API_URL:"https://api.ingka.ikea.com/address/validateZip",VALIDATE_ZIP_API_KEY:"4SEgr36x8rOZ6vuHoX30FNm3SmWaYev5",RECS_OPTIMIZELY_SDK_KEY:"8hr89wMDrZvcMQFojb8HE",CROSS_TEAM_OPTIMIZELY_SDK_KEY:"8g3vq1fGmjTFBVEY4qoP4",AVAILABILITY_CIA_API_URL:"https://api.ingka.ikea.com/cia/availabilities/ru",AVAILABILITY_CIA_API_KEY:"a3243ad8-59ee-4ce9-9fd7-b9017171a43a"})}},v=>{var S=d=>v(v.s=d),n=S(7133)}]);})();