mealz-injector 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mealz-injector-environment.js","sources":["../src/environments/environment.js"],"sourcesContent":["export const env = {\n carrefour: {\n token: btoa(JSON.stringify({\n supplierId: 24,\n origin: \"carrefour\",\n domain: \"miam.carrefour.web\",\n })),\n },\n coursesu: {\n token: btoa(JSON.stringify({\n supplierId: 7,\n origin: \"coursesu\",\n domain: globalThis.location.href.includes(\"https://www.coursesu.com/\") ? \"miam.coursesu.web\" : \"miam.test\",\n noSupplier: false,\n orderHistory: true,\n })),\n },\n monoprix: {\n domain: 'miam.monoprix.web',\n alSupplierId: 10,\n nonalSupplierId: 11\n },\n ssr: {\n baseUrl: 'https://ssr-api.mealz.ai',\n }\n};"],"names":["env","carrefour","token","btoa","JSON","stringify","supplierId","origin","domain","coursesu","globalThis","location","href","includes","noSupplier","orderHistory","monoprix","alSupplierId","nonalSupplierId","ssr","baseUrl"],"mappings":"AAAY,MAACA,EAAM,CACjBC,UAAW,CACTC,MAAOC,KAAKC,KAAKC,UAAU,CACzBC,WAAY,GACZC,OAAQ,YACRC,OAAQ,yBAGZC,SAAU,CACRP,MAAOC,KAAKC,KAAKC,UAAU,CACzBC,WAAY,EACZC,OAAQ,WACRC,OAAQE,WAAWC,SAASC,KAAKC,SAAS,6BAA+B,oBAAsB,YAC/FC,YAAY,EACZC,cAAc,MAGlBC,SAAU,CACRR,OAAQ,oBACRS,aAAc,GACdC,gBAAiB,IAEnBC,IAAK,CACHC,QAAS"}
@@ -0,0 +1,3 @@
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var i=document.createElement("style");i.appendChild(document.createTextNode('@charset "UTF-8";:root .miam-modal__container .miam-modal .miam-modal__content-container .miam-modal__header .miam-modal__close-icon{background-image:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Cross_black.svg)}:root .miam-modal__container .miam-modal .miam-modal__content-container .miam-modal__header .miam-modal__close-icon.miam-ds-button.ghost:hover:not(.loading):not(.disabled):not([disabled]){background-color:unset}:root .miam-modal__container .miam-modal.with-header .miam-modal__content-container .miam-modal__header .miam-modal__title{color:#000;font-weight:700;font-size:20px}:root .miam-modal__container .miam-modal.with-header .miam-modal__content-container .miam-modal__header .miam-modal__close-icon{height:unset;padding:12px}:root .miam-modal__container.right .miam-modal.without-header .miam-modal__content-container .miam-modal__header .miam-modal__close-icon{margin:16px}@media(max-width:1023px){:root .miam-modal__container.right .miam-modal.without-header .miam-modal__content-container .miam-modal__header .miam-modal__close-icon{margin:0 16px}}:root webc-miam-suggestion-card{margin-bottom:.6rem}:root .miam-recipe-card{width:100%;min-height:unset;margin-top:27px;height:calc(100% - 27px);box-shadow:#00000040 0 0 5px;border-radius:4px}@media(max-width:575px){:root .miam-recipe-card{flex-direction:row;height:260px;margin:0;width:100%}}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__top{border-radius:4px 4px 0 0}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__top .miam-recipe-card__content .miam-recipe-card__top-container{margin:8px}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__top .miam-recipe-card__content .miam-recipe-card__top-container .miam-recipe-card__badge-container{background-color:var(--miam-color-secondary-hover);border-radius:4px;display:inline-flex;padding:4px 8px;justify-content:center;align-items:center;height:fit-content}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__top .miam-recipe-card__content .miam-recipe-card__top-container .miam-recipe-card__badge-container img{display:none}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__top .miam-recipe-card__content .miam-recipe-card__top-container .miam-recipe-card__badge-container:after{content:"Idée repas";font-size:12px;font-weight:600;line-height:140%}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__top .miam-recipe-card__content .miam-recipe-card__top-container .miam-recipe-card__badge-container.drink:after{content:"Idée boisson"}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__top .miam-recipe-card__content .miam-recipe-card__top-container .miam-recipe-card__like .miam-like-button{border-radius:4px}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__top .miam-recipe-card__content .miam-recipe-card__picture__bottom{padding:8px;gap:8px}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__top .miam-recipe-card__content .miam-recipe-card__picture__bottom .miam-recipe-card__title{font-size:14px;font-weight:600;line-height:140%}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__top .miam-recipe-card__content .miam-recipe-card__picture__bottom .miam-recipe-card__counter{border-radius:4px}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__top .miam-recipe-card__content .miam-recipe-card__picture__bottom .miam-recipe-card__counter .miam-ds-text{line-height:initial}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__top .miam-recipe-card__content .miam-recipe-card__picture__bottom .miam-recipe-card__counter img{display:none}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__top .miam-recipe-card__content .miam-recipe-card__picture__bottom .miam-recipe-card__counter:after{content:"";background-image:url(https://storage.googleapis.com/assets.miam.tech/generic/icons/recipe-counter-black.svg);width:16px;height:16px;background-position:center}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom{height:130px;box-sizing:border-box;padding:8px;border-radius:0 0 4px 4px}@media(max-width:1024px){:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom{height:fit-content}}@media(min-width:1025px){:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions{flex-direction:column;justify-content:flex-end;height:100%}}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__infos{width:100%}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__difficulty-and-time .miam-recipe-card__difficulty img{content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/ChefHat.svg)}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__difficulty-and-time .miam-recipe-card__time img{content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Clock.svg)}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__price{margin-right:unset;width:100%}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__price ng-miam-recipe-pricing .miam-recipe-pricing{align-items:flex-start}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__price ng-miam-recipe-pricing .miam-recipe-pricing .miam-recipe-pricing__wrapper{flex-flow:row}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__price ng-miam-recipe-pricing .miam-recipe-pricing .miam-recipe-pricing__wrapper .miam-recipe-pricing__wrapper__subline{margin-left:4px;padding-left:1px;font-weight:500;font-size:14px;line-height:21px;color:#000;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:65px}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__price ng-miam-recipe-pricing .miam-recipe-pricing .miam-recipe-pricing__wrapper .miam-recipe-pricing__wrapper__price{font-size:14px;line-height:21px;flex:1;white-space:nowrap;color:#000;font-weight:500}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__price ng-miam-recipe-pricing .miam-recipe-pricing .miam-recipe-pricing__total{display:block;font-size:20px;font-weight:600;line-height:24px;color:#000}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__price ng-miam-recipe-pricing .miam-recipe-pricing .miam-recipe-pricing__total span:first-child{display:none}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__cta{display:block}@media(min-width:1025px){:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__cta{width:100%}}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__cta ng-miam-recipe-card-cta .miam-recipe-card-cta{width:100%}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__cta ng-miam-recipe-card-cta .miam-recipe-card-cta .miam-ds-button{width:100%}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__cta ng-miam-recipe-card-cta .miam-recipe-card-cta .miam-ds-button span,:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__cta ng-miam-recipe-card-cta .miam-recipe-card-cta .miam-ds-button img{display:none}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__cta ng-miam-recipe-card-cta .miam-recipe-card-cta .miam-ds-button:after{content:"";display:block}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__cta ng-miam-recipe-card-cta .miam-recipe-card-cta .miam-ds-button.primary,:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__cta ng-miam-recipe-card-cta .miam-recipe-card-cta .miam-ds-button.in-basket.secondary{background-color:var(--miam-color-secondary-light);border:1px solid var(--miam-color-secondary-hover);color:var(--miam-catalog-header-reduced-text-color)}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__cta ng-miam-recipe-card-cta .miam-recipe-card-cta .miam-ds-button.primary:hover{background-color:var(--miam-color-secondary-hover)}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__cta ng-miam-recipe-card-cta .miam-recipe-card-cta .miam-ds-button.primary:after{background-image:unset;content:"Ajouter"}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__cta ng-miam-recipe-card-cta .miam-recipe-card-cta .miam-ds-button.in-basket.secondary{background-color:var(--miam-ds-color-neutral-white)}:root .miam-recipe-card .miam-recipe-card__container .miam-recipe-card__bottom .miam-recipe-card__actions .miam-recipe-card__cta ng-miam-recipe-card-cta .miam-recipe-card-cta .miam-ds-button.in-basket.secondary:after{background-image:unset;content:"Dans le panier"}:root .miam-recipe-card.in-basket .miam-recipe-card__container .miam-recipe-card__bottom{background-color:var(--miam-color-secondary-lightest)}:root .miam-recipe-modal__basket-preview-modal .miam-modal__container .miam-modal.with-header .miam-modal__content-container .miam-modal__header{border-bottom:1px solid var(--miam-ds-color-border);flex-direction:row-reverse}:root .miam-recipe-modal__basket-preview-modal .miam-modal__container .miam-modal.with-header .miam-modal__content-container .miam-modal__header .miam-modal__title{text-align:center;width:100%;font-weight:600;line-height:120%}:root .miam-recipe-modal__basket-preview-modal .miam-modal__container .miam-modal.with-header .miam-modal__content-container .miam-modal__header .miam-modal__close-icon{background-image:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Caret.svg)}:root .miam-basket-preview-block{padding:16px}:root .miam-basket-preview-block .miam-basket-preview-block__title{text-align:center;font-weight:600}:root .miam-basket-preview-block .miam-basket-preview-block__lines{height:100%}:root .miam-basket-preview-block .miam-basket-preview-block__lines .miam-basket-preview-line{border-radius:4px;padding:8px}:root .miam-basket-preview-block .miam-basket-preview-block__lines .miam-basket-preview-line .miam-basket-preview-line__left .miam-basket-preview-line__picture{border-radius:4px}:root .miam-basket-preview-block .miam-basket-preview-block__lines .miam-basket-preview-line .miam-basket-preview-line__left .miam-basket-preview-line__picture img{border-radius:4px}:root .miam-basket-preview-block .miam-basket-preview-block__lines .miam-basket-preview-line .miam-basket-preview-line__right .miam-basket-preview-line__top .miam-basket-preview-line__title{font-weight:600;line-height:140%;color:#000}:root .miam-basket-preview-block .miam-basket-preview-block__lines .miam-basket-preview-line .miam-basket-preview-line__right .miam-basket-preview-line__top .miam-basket-preview-line__product-count{color:#9e9e9e;line-height:140%}:root .miam-basket-preview-block .miam-basket-preview-block__lines .miam-basket-preview-line .miam-basket-preview-line__right .miam-basket-preview-line__top .miam-basket-preview-line__remove{padding:0;height:fit-content}:root .miam-basket-preview-block .miam-basket-preview-block__lines .miam-basket-preview-line .miam-basket-preview-line__right .miam-basket-preview-line__link{color:var(--miam-catalog-header-reduced-text-color)}:root .miam-basket-preview-block .miam-basket-preview-block__lines .miam-basket-preview-line .miam-basket-preview-line__right .miam-basket-preview-line__link img{content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Arrow.svg);transform:rotate(180deg);width:20px;height:20px}:root .miam-basket-preview-block .miam-basket-preview-block__lines .miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__top .miam-basket-preview-line__infos .miam-basket-preview-line__price-label{color:#000;font-size:20px;font-style:normal;font-weight:600;line-height:24px}:root .miam-basket-preview-block .miam-basket-preview-block__lines .miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__top .miam-basket-preview-line__infos .miam-basket-preview-line__price-per-person-label{color:#9e9e9e;font-size:14px;font-style:normal;font-weight:400;line-height:140%}:root .miam-basket-preview-block .miam-basket-preview-block__lines .miam-basket-preview-block__lines__not-found{margin:auto}:root .miam-basket-preview-block .miam-basket-preview-block__lines .miam-basket-preview-block__lines__not-found img{content:"";display:block;margin:auto;height:64px;width:64px;background:center/contain no-repeat url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Search_Big.svg)}:root .miam-basket-preview-block .miam-basket-preview-block__lines .miam-basket-preview-block__lines__not-found p{display:none}:root .miam-basket-preview-block .miam-basket-preview-block__lines .miam-basket-preview-block__lines__not-found:after{content:"Vous n’avez pas encore ajouté de repas";font-size:16px;line-height:22px;font-weight:600}:root .miam-like-button.miam-ds-button.primary.reverse.square.small{display:inline-flex;height:32px;width:32px;padding:8px;align-items:center;border-radius:4px;box-sizing:border-box}:root .miam-like-button.miam-ds-button.primary.reverse.square.small .miam-like-button__icon{height:16px;width:16px}:root .miam-like-button.miam-ds-button.primary.reverse.square.small .miam-like-button__icon img{display:none}:root .miam-like-button.miam-ds-button.primary.reverse.square.small .miam-like-button__icon:after{content:"";background-image:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Heart.svg);transition:background-image .3s ease-in-out;height:100%;width:100%;display:block}:root .miam-like-button.miam-ds-button.primary.reverse.square.small .miam-like-button__icon.fill:after{background-image:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/HeartFill.svg)}:root .miam-list-scan{display:flex;flex-direction:row;justify-content:center;align-items:center}@media(max-width:1023px){:root .miam-list-scan .miam-list-scan__result .miam-modal{width:100%;max-width:unset}}:root .miam-list-scan .miam-list-scan__result .miam-modal .miam-modal__content-container .miam-modal__actions{display:block}:root .miam-list-scan .miam-list-scan__result .miam-modal .miam-modal__content-container .miam-modal__actions .miam-modal__interactions{padding:16px;gap:16px}:root .miam-list-scan .miam-list-scan__result .miam-modal .miam-modal__content-container .miam-modal__actions .miam-modal__interactions .miam-ds-button{flex:1}:root .miam-list-scan .miam-list-scan__result .miam-modal .miam-modal__content-container .miam-modal__actions .miam-modal__interactions .primary{color:var(--miam-color-neutral-black);background-color:var(--miam-color-secondary)}:root .miam-list-scan .miam-list-scan__result .miam-modal .miam-modal__content-container .miam-modal__actions .miam-modal__interactions .primary:hover{background-color:var(--miam-color-secondary-hover);color:var(--miam-color-white)}:root .miam-list-scan .miam-list-scan__result .miam-modal .miam-modal__content-container .miam-modal__actions .miam-modal__interactions .secondary{border:1px solid var(--miam-ds-color-border)}:root .miam-list-scan .miam-list-scan__result .miam-modal .miam-modal__content-container .miam-modal__actions .miam-modal__interactions .secondary:hover{background-color:var(--miam-color-background-primary-hover);color:var(--miam-color-neutral-black)}:root .miam-list-scan .miam-list-scan__result .miam-modal .miam-modal__content-container .miam-modal__actions .miam-modal__interactions button+button{margin-left:0}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview{display:flex;flex-direction:column;gap:8px}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview ng-miam-product-addition-card{margin-bottom:0}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview ng-miam-product-addition-card .miam-product-addition-card{background-color:var(--miam-color-white);border:1px solid var(--miam-ds-color-border);border-radius:4px}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview ng-miam-product-addition-card .miam-product-addition-card:before{content:"Un produit manquant ?";font-size:16px;font-style:normal;font-weight:600;line-height:140%}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview ng-miam-product-addition-card .miam-product-addition-card .miam-product-addition-card__title{display:none}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview ng-miam-product-addition-card .miam-product-addition-card .miam-product-addition-card__button{border-radius:4px;border-color:var(--miam-ds-color-border)}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview .miam-list-scan__basket-preview__product{margin:0;background-color:var(--miam-color-white);border:#d6d6d6 1px solid}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview .miam-list-scan__basket-preview__product .miam-list-scan__basket-preview__product__name{background-color:#e6e6e6;border-bottom:#d6d6d6 1px solid}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview .miam-list-scan__basket-preview__product .miam-basket-preview-product .miam-basket-preview-product__infos-container .miam-basket-preview-product__picture-container{margin-right:8px;margin-bottom:0}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview .miam-list-scan__basket-preview__product .miam-basket-preview-product .miam-basket-preview-product__infos-container .miam-basket-preview-product__picture-container .miam-basket-preview-product__picture{height:88px;width:88px}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview .miam-list-scan__basket-preview__product .miam-basket-preview-product .miam-basket-preview-product__infos-container .miam-basket-preview-product__infos-and-actions .miam-basket-preview-product__infos .miam-product-card__badges{display:none}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview .miam-list-scan__basket-preview__product .miam-basket-preview-product .miam-basket-preview-product__infos-container .miam-basket-preview-product__infos-and-actions .miam-basket-preview-line__remove{padding:6px;border:1px solid var(--miam-ds-color-border)}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview .miam-list-scan__basket-preview__product .miam-basket-preview-product .miam-basket-preview-product__infos-container .miam-basket-preview-product__infos-and-actions .miam-basket-preview-line__remove img{height:24px;width:24px;content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Trash_black.svg)}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview .miam-list-scan__basket-preview__product .miam-basket-preview-product .miam-basket-preview-product__price-and-action{margin-left:96px}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview .miam-list-scan__basket-preview__product .miam-basket-preview-product .miam-basket-preview-product__price-and-action .miam-counter-input{padding:unset}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview .miam-list-scan__basket-preview__product .miam-basket-preview-product .miam-basket-preview-product__price-and-action .miam-counter-input .miam-counter-input__counter{gap:0;border-radius:4px}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview .miam-list-scan__basket-preview__product .miam-basket-preview-product .miam-basket-preview-product__price-and-action .miam-counter-input .miam-counter-input__counter .miam-counter-input__minus,:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview .miam-list-scan__basket-preview__product .miam-basket-preview-product .miam-basket-preview-product__price-and-action .miam-counter-input .miam-counter-input__counter .miam-counter-input__plus{height:32px;width:32px;box-sizing:content-box}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview .miam-list-scan__basket-preview__product .miam-basket-preview-product .miam-basket-preview-product__price-and-action .miam-counter-input .miam-counter-input__counter .miam-counter-input__minus{background-color:var(--miam-color-secondary-light);border-radius:4px 0 0 4px;border:1px solid var(--miam-color-secondary-hover)}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview .miam-list-scan__basket-preview__product .miam-basket-preview-product .miam-basket-preview-product__price-and-action .miam-counter-input .miam-counter-input__counter .miam-counter-input__minus:hover{background-color:var(--miam-color-secondary-hover)}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview .miam-list-scan__basket-preview__product .miam-basket-preview-product .miam-basket-preview-product__price-and-action .miam-counter-input .miam-counter-input__counter .miam-counter-input__minus img{height:24px;width:24px;content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Minus.svg)}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview .miam-list-scan__basket-preview__product .miam-basket-preview-product .miam-basket-preview-product__price-and-action .miam-counter-input .miam-counter-input__counter .miam-counter-input__value-container{padding:8px;height:32px;width:32px;box-sizing:content-box;border-top:1px solid var(--miam-color-secondary-hover);border-bottom:1px solid var(--miam-color-secondary-hover)}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview .miam-list-scan__basket-preview__product .miam-basket-preview-product .miam-basket-preview-product__price-and-action .miam-counter-input .miam-counter-input__counter .miam-counter-input__value-container .miam-counter-input__value-text{text-align:center}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview .miam-list-scan__basket-preview__product .miam-basket-preview-product .miam-basket-preview-product__price-and-action .miam-counter-input .miam-counter-input__counter .miam-counter-input__plus{background-color:var(--miam-color-secondary);border:1px solid var(--miam-color-secondary-hover);border-radius:0 4px 4px 0}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview .miam-list-scan__basket-preview__product .miam-basket-preview-product .miam-basket-preview-product__price-and-action .miam-counter-input .miam-counter-input__counter .miam-counter-input__plus:hover{background-color:var(--miam-color-secondary-hover)}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview .miam-list-scan__basket-preview__product .miam-basket-preview-product .miam-basket-preview-product__price-and-action .miam-counter-input .miam-counter-input__counter .miam-counter-input__plus img{height:24px;width:24px;content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Plus.svg)}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview .miam-list-scan__basket-preview__product .miam-basket-preview-product__replace-button{color:var(--miam-color-neutral-black)}:root .miam-list-scan .miam-list-scan__content .miam-list-scan__basket-preview .miam-list-scan__basket-preview__product .miam-basket-preview-product__replace-button span:before{content:"";display:inline-block;background-image:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Swap.svg);background-size:20px 20px;height:20px;width:20px;vertical-align:middle;margin-right:4px}:root .miam-list-scan .miam-loader{border:4px solid transparent;border-top:4px solid var(--miam-color-white);height:24px;width:24px}:root .miam-files-inputs .miam-ds-button{gap:8px}@media(min-width:1024px){:root .miam-list-scan__confirmation .miam-modal__container .miam-modal{max-width:492px}}:root .miam-list-scan__confirmation .miam-modal__container .miam-modal{border-radius:4px}:root .miam-list-scan__confirmation .miam-modal__container .miam-modal .miam-modal__header{background-color:unset;height:unset}:root .miam-list-scan__confirmation .miam-modal__container .miam-modal .miam-modal__header .miam-modal__title{margin:0;padding-left:64px;font-weight:600;font-size:24px;line-height:28px;font-family:ltf-etica,sans-serif;text-align:center}:root .miam-list-scan__confirmation .miam-modal__container .miam-modal .miam-modal__actions{display:block}:root .miam-list-scan__confirmation .miam-modal__container .miam-modal .miam-modal__actions button{width:186px;border-radius:4px;font-family:ltf-etica,sans-serif;font-weight:600;font-size:14px;line-height:18px}:root .miam-list-scan__confirmation .miam-modal__container .miam-modal .miam-modal__actions .primary{color:var(--miam-color-neutral-black);background-color:var(--miam-color-secondary)}:root .miam-list-scan__confirmation .miam-modal__container .miam-modal .miam-modal__actions .primary:hover{background-color:var(--miam-color-secondary-hover);color:var(--miam-color-white)}:root .miam-list-scan__confirmation .miam-modal__container .miam-modal .miam-modal__actions .secondary{border:1px solid var(--miam-ds-color-border)}:root .miam-list-scan__confirmation .miam-modal__container .miam-modal .miam-modal__actions .secondary:hover{background-color:var(--miam-color-background-primary-hover);color:var(--miam-color-neutral-black)}:root .guests-dropdown .guests-dropdown__button:hover{border-color:#000}:root .guests-dropdown .guests-dropdown__button--on{border:solid 2px #000}:root .guests-dropdown .guests-dropdown__guests-icon{content:url(https://storage.googleapis.com/assets.miam.tech/generic/icons/recipe-counter-black.svg)}:root .miam-replace-item__header .miam-ds-button.ghost.square ng-miam-icon,:root .miam-replace-item__header .miam-ds-button.ghost.square img{display:none}:root .miam-replace-item__header .miam-ds-button.ghost.square:after{content:"";width:24px;height:24px;background:center/contain no-repeat url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Caret.svg)}:root .miam-replace-item__header span{color:#000;font-size:20px;font-weight:600;line-height:120%}:root .miam-replace-item__top-container .miam-replace-item__searchbar{border-radius:10px;border:1px solid #BCBCBB;background:#f5f4f2}:root .miam-replace-item__top-container .miam-replace-item__searchbar ng-miam-icon,:root .miam-replace-item__top-container .miam-replace-item__searchbar img{display:none}:root .miam-replace-item__top-container .miam-replace-item__searchbar:before{content:"";width:20px;height:21px;background:center/contain no-repeat url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Search.svg)}:root .miam-replace-item__top-container .miam-replace-item__searchbar input{color:#000;font-size:14px;font-style:normal;font-weight:400;line-height:150%}:root .miam-replace-item__product-list .miam-replace-item__product-item .miam-replace-item__card-lower-section .miam-replace-item__product-price{color:#000;font-weight:600}:root .miam-replace-item__product-list .miam-replace-item__product-item .miam-replace-item__card-lower-section .miam-replace-item__cta{background-color:var(--miam-color-secondary-light);border:1px solid var(--miam-color-secondary-hover);color:var(--miam-ds-color-neutral-black);border-radius:4px;height:unset;padding:8px 16px}:root .miam-replace-item__product-list .miam-replace-item__product-item .miam-replace-item__card-lower-section .miam-replace-item__cta.miam-ds-button.primary:not(.ghost):hover:not(.loading):not(.disabled):not([disabled]){background-color:var(--miam-color-secondary-hover)}:root .miam-replace-item__product-list .miam-replace-item__product-item .miam-replace-item__card-lower-section .miam-replace-item__cta[disabled]{background-color:var(--miam-ds-color-bg-disabled);border:unset}:root .miam-replace-item__product-list .miam-replace-item__product-item .miam-replace-item__card-lower-section .miam-replace-item__cta[disabled] span{color:var(--miam-ds-color-text-disabled)}:root .miam-replace-item__product-list .miam-replace-item__error .miam-replace-item__error-image-container img{content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Search_Big.svg)}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__close-button{border:1px solid var(--monop-border-neutral, #D6D6D6);padding:8px;border-radius:4px;height:unset}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__close-button img{content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Cross_black.svg);width:24px;height:24px}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__close-button:hover:not(.disabled){content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Cross_black.svg);background-color:var(--miam-ds-color-primary-100)}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__mobile-header-buttons .miam-recipe-details__back-button:hover,:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__mobile-header-buttons .miam-recipe-details__back-button:hover:hover{background-color:var(--miam-ds-color-primary-100)}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__mobile-header-buttons .miam-recipe-details__back-button,:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__mobile-header-buttons .miam-recipe-details__back-button:hover{transform:unset}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__mobile-header-buttons .miam-recipe-details__back-button img.miam-recipe-details__back-icon,:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__mobile-header-buttons .miam-recipe-details__back-button:hover img.miam-recipe-details__back-icon{content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Caret.svg);width:24px;height:24px}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__guest-counter .miam-counter-input{border-radius:4px;padding:4px}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__guest-counter .miam-counter-input .miam-counter-input__counter .miam-counter-input__minus,:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__guest-counter .miam-counter-input .miam-counter-input__counter .miam-counter-input__plus{height:unset;border-radius:4px}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__guest-counter .miam-counter-input .miam-counter-input__counter .miam-counter-input__minus img,:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__guest-counter .miam-counter-input .miam-counter-input__counter .miam-counter-input__plus img{height:24px;width:24px}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__guest-counter .miam-counter-input .miam-counter-input__counter .miam-counter-input__minus:hover,:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__guest-counter .miam-counter-input .miam-counter-input__counter .miam-counter-input__plus:hover{background-color:var(--miam-ds-color-primary-100)}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__guest-counter .miam-counter-input .miam-counter-input__counter .miam-counter-input__minus img{content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Minus_black.svg)}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__guest-counter .miam-counter-input .miam-counter-input__counter .miam-counter-input__plus img{content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Plus_black.svg)}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__picture__filigrane{display:none}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__title{width:calc(100% - 40px)}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container.is-pinned .miam-recipe-details__title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container.is-pinned .miam-recipe-details__back-button-mobile-container .miam-recipe-details__back-button img{content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Caret.svg);width:24px;height:24px}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__actions__icon{align-items:center}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__actions__icon .miam-recipe-details__hideable-actions .miam-recipe-details__close-button{padding:8px;border-radius:4px;height:unset;margin-left:unset}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__actions__icon .miam-recipe-details__hideable-actions .miam-recipe-details__close-button img{content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Cross_black.svg);width:24px;height:24px}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__actions__icon .miam-recipe-details__hideable-actions .miam-recipe-details__close-button:hover{background-color:var(--miam-ds-color-primary-100)}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__infos .miam-recipe-details-infos__container .miam-recipe-details-infos__badge{background-color:var(--miam-ds-color-neutral-white);border:1px solid var(--miam-ds-color-border)}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__tabs .miam-ds-slider-tabs .miam-ds-slider-tab span{display:none}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__tabs .miam-ds-slider-tabs .miam-ds-slider-tab.active:after{color:var(--miam-ds-color-primary-text)}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__tabs .miam-ds-slider-tabs .miam-ds-slider-tab:after{content:"Les produits";transition:all .3s ease-in-out;color:var(--miam-ds-color-neutral-black);line-height:100%}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__tabs .miam-ds-slider-tabs .miam-ds-slider-tab+.miam-ds-slider-tab:after{content:"La recette"}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__tabs .miam-ds-slider-tabs .miam-ds-slider-tab__background{background-color:var(--miam-ds-color-neutral-black)}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__header .miam-products-picker__header-text{font-weight:600}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__header .miam-product-card__header-name{font-size:16px;line-height:140%}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__header .miam-product-card__header-quantity{line-height:150%}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container.added{border-color:var(--miam-color-secondary)}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container.added .miam-product-card__header.added{background-color:var(--miam-color-secondary)}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container.added .miam-product-card__header.added .miam-product-card__header-name,:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container.added .miam-product-card__header.added .miam-product-card__header-quantity{color:var(--miam-color-neutral-black)}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container.disabled .miam-product-card__header.disabled{background-color:var(--miam-ds-color-primary-100)}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container.disabled .miam-product-card__header.disabled .miam-product-card__header-name,:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container.disabled .miam-product-card__header.disabled .miam-product-card__header-quantity{color:#000;opacity:.6}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container.disabled .miam-product-card__content.disabled{background-color:var(--miam-ds-color-primary-100)}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container.disabled .miam-product-card__content.disabled .miam-product-card__disabled-text{color:#000;opacity:.6}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container.disabled .miam-product-card__content.disabled .miam-ds-button.ghost{background-color:var(--miam-ds-color-neutral-white);color:var(--miam-color-neutral-black);border:1px solid var(--miam-ds-color-border);padding:8px 12px;height:unset;border-radius:4px}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container.disabled .miam-product-card__content.disabled .miam-ds-button.ghost:hover{background-color:var(--miam-ds-color-primary-100)}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__content .miam-product-card__selected-product .miam-product-card__info-column .miam-ds-button.ghost span{color:var(--miam-ds-color-neutral-black)}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__price{color:#000;font-weight:600}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-product-card__ignore-product{height:unset;padding:8px 12px;border:1px solid var(--miam-ds-color-border)}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-product-card__ignore-product .miam-product-card__disabled-text{color:var(--miam-color-neutral-black);opacity:1}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-product-card__ignore-product:hover{background-color:var(--miam-ds-color-primary-100)}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-product-card__add-product,:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-product-card__loading-button{background-color:var(--miam-color-secondary-light);border:1px solid var(--miam-color-secondary-hover);color:var(--miam-ds-color-neutral-black);border-radius:4px;height:unset}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-product-card__add-product img{content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Basket.svg);display:block;height:24px;width:24px}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-product-card__add-product:hover{background-color:var(--miam-color-secondary-hover)}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-counter-input{padding:unset}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-counter-input .miam-counter-input__counter{gap:0;border-radius:4px}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-counter-input .miam-counter-input__counter .miam-counter-input__minus,:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-counter-input .miam-counter-input__counter .miam-counter-input__plus{height:24px;width:44px;box-sizing:content-box}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-counter-input .miam-counter-input__counter .miam-counter-input__minus{background-color:var(--miam-color-secondary-light);border-radius:4px 0 0 4px;border:1px solid var(--miam-color-secondary-hover)}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-counter-input .miam-counter-input__counter .miam-counter-input__minus:hover{background-color:var(--miam-color-secondary-hover)}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-counter-input .miam-counter-input__counter .miam-counter-input__minus img{height:24px;width:24px;content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Minus.svg)}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-counter-input .miam-counter-input__counter .miam-counter-input__value-container{padding:8px;height:24px;width:40px;box-sizing:content-box;border-top:1px solid var(--miam-color-secondary-hover);border-bottom:1px solid var(--miam-color-secondary-hover)}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-counter-input .miam-counter-input__counter .miam-counter-input__value-container .miam-counter-input__value-text{text-align:center}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-counter-input .miam-counter-input__counter .miam-counter-input__plus{background-color:var(--miam-color-secondary);border:1px solid var(--miam-color-secondary-hover);border-radius:0 4px 4px 0}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-counter-input .miam-counter-input__counter .miam-counter-input__plus:hover{background-color:var(--miam-color-secondary-hover)}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-counter-input .miam-counter-input__counter .miam-counter-input__plus img{height:24px;width:24px;content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Plus.svg)}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__list .miam-products-picker__items .miam-product-card__container .miam-product-card__footer>div{color:#000;opacity:.6;line-height:150%;font-weight:600;font-family:Satoshi}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__more .miam-ds-button.secondary{border:unset;flex:unset;border-radius:4px;height:unset;color:var(--miam-color-neutral-black)}:root .miam-recipe-details .miam-recipe-details__container .miam-products-picker__container .miam-products-picker__more .miam-ds-button.secondary:hover{background-color:var(--miam-ds-color-primary-100);color:var(--miam-color-neutral-black);border:unset}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer .miam-recipe-details__price .miam-recipe-details__price-label{color:#000;font-size:20px;font-style:normal;font-weight:600;line-height:24px}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer .miam-recipe-details__price .miam-recipe-details__price-in-basket-label{color:#000;font-size:14px;font-style:normal;font-weight:500;line-height:150%;opacity:1}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer .miam-recipe-details__add-to-basket-cta:not(.disabled):not([disabled]),:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer .miam-ds-button.secondary:not(.disabled):not([disabled]){background-color:var(--miam-color-secondary-light);border:1px solid var(--miam-color-secondary-hover);color:var(--miam-ds-color-neutral-black);border-radius:4px;height:unset;flex-grow:0}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer .miam-recipe-details__add-to-basket-cta:not(.disabled):not([disabled]).miam-ds-button.primary:not(.ghost):hover:not(.loading):not(.disabled):not([disabled]),:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer .miam-ds-button.secondary:not(.disabled):not([disabled]).miam-ds-button.primary:not(.ghost):hover:not(.loading):not(.disabled):not([disabled]){background-color:var(--miam-color-secondary-hover)}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer .miam-recipe-details__add-to-basket-cta:not(.disabled):not([disabled]) .miam-recipe-details__add-to-basket-cta__text,:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer .miam-ds-button.secondary:not(.disabled):not([disabled]) .miam-recipe-details__add-to-basket-cta__text{color:var(--miam-color-neutral-black);white-space:nowrap}:root .miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer .miam-recipe-details__add-to-basket-cta img{content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Basket.svg);display:block;height:24px;width:24px}:root .miam-recipe-tag-container .miam-recipe-tags__recipes{position:absolute;top:206px;transform:translateY(-50%);z-index:1;right:8px;font-size:12px;line-height:16px;background-color:var(--miam-color-secondary);padding:1px 4px;border-radius:3px}@media(max-width:575px){:root .miam-recipe-tag-container .miam-recipe-tags__recipes{top:16px;right:unset;left:76px;z-index:2}}:root .miam-recipe-tag-container .miam-shadow-overlay{z-index:8;background:var(--miam-color-black)}:root .miam-recipe-tag-container .miam-modal.with-header{background-color:var(--miam-color-white);z-index:8}:root .miam-recipe-tag-container .miam-modal.with-header .miam-modal__header{background-color:var(--miam-color-white)}:root .miam-recipe-tag-container .miam-modal.with-header .miam-modal__header .miam-modal__title{margin:0;padding:20px 64px;font-weight:600;font-size:25px;line-height:32px;font-family:ltf-etica,sans-serif;text-align:center;color:#252525}:root .miam-recipe-tag-container .miam-modal.with-header .miam-recipe-tags__container__list .miam-recipe-tags__list__badge{border:1px solid #D6D6D6;border-radius:3px;padding:4px}:root .miam-recipe-tag-container .miam-modal.with-header .miam-recipe-tags__container__list .miam-recipe-tags__list__badge ng-miam-icon{display:none}@media(max-width:1023px){:root .miam-recipe-tag-container .miam-modal.with-header{top:unset;bottom:0;transform:unset;right:unset;width:100vw}:root .miam-recipe-tag-container .miam-modal.with-header .miam-modal__header .miam-modal__title{padding:0;width:100%;text-align:center;margin:10px}:root .miam-recipe-tag-container .miam-modal.with-header .miam-modal__header .miam-modal__close__icon{position:absolute;top:8px;right:8px;margin:0}:root .miam-recipe-tag-container .miam-modal.with-header .miam-modal__header .miam-modal__close__icon .icon-container{border:none}:root .miam-recipe-tag-container .miam-modal.with-header .miam-recipe-tags__container__list{align-items:center}}:root .miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__myMeal__button{background-color:var(--miam-ds-color-primary)}:root .miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__myMeal__button .miam-recipe-catalog__myMeal__second__icon{content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/ArrowLeft_white.svg);height:24px;width:24px;padding:4px;transform:rotate(180deg)}:root .miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories{padding:24px}@media(max-width:1023px){:root .miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories{padding:24px 0}:root .miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories ng-miam-recipe-card .miam-recipe-card{width:240px}}:root .miam-recipe-catalog .miam-recipe-catalog__toolbar-container{padding:32px 24px 0}:root .miam-recipe-catalog .miam-recipe-catalog__toolbar-container.sticking{z-index:4}:root .miam-recipe-catalog .miam-recipe-catalog__toolbar-container .miam-catalog-toolbar .miam-catalog-toolbar__left{padding:0}:root .miam-recipe-catalog .miam-recipe-catalog__toolbar-container .miam-catalog-toolbar .miam-catalog-toolbar__buttons-container{padding:0}:root .miam-recipe-catalog .miam-recipe-catalog__toolbar-container .miam-catalog-toolbar .miam-catalog-toolbar__buttons-container .miam-ds-button.miam-catalog-toolbar__controls__favorites:not(.ghost),:root .miam-recipe-catalog .miam-recipe-catalog__toolbar-container .miam-catalog-toolbar .miam-catalog-toolbar__buttons-container .miam-ds-button.miam-catalog-toolbar__controls__personal:not(.ghost),:root .miam-recipe-catalog .miam-recipe-catalog__toolbar-container .miam-catalog-toolbar .miam-catalog-toolbar__buttons-container .miam-ds-button.miam-catalog-toolbar__controls__preferences:not(.ghost){border-radius:4px;border:1px solid #D6D6D6;background:#fff}:root .miam-recipe-catalog .miam-recipe-catalog__toolbar-container .miam-catalog-toolbar .miam-catalog-toolbar__buttons-container .miam-ds-button.miam-catalog-toolbar__controls__preferences img{content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Preferences_black.svg)}:root .miam-recipe-catalog .miam-recipe-catalog__toolbar-container .miam-catalog-toolbar .miam-catalog-toolbar__controls__filter .miam-catalog-toolbar__controls__filter-badge,:root .miam-recipe-catalog .miam-recipe-catalog__toolbar-container .miam-catalog-toolbar .miam-catalog-toolbar__controls__preferences .miam-catalog-toolbar__controls__filter-badge{background-color:var(--miam-ds-color-primary)}:root .miam-recipe-catalog .miam-recipe-catalog__toolbar-container .miam-catalog-toolbar .miam-catalog-toolbar__controls__filter:not(.full),:root .miam-recipe-catalog .miam-recipe-catalog__toolbar-container .miam-catalog-toolbar .miam-catalog-toolbar__controls__preferences:not(.full){top:2px;right:2px}:root .miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title{padding:0 24px}:root .miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title .miam-recipe-catalog__content__title-icon,:root .miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title .miam-ds-button.primary:not(.ghost):not(.disabled):not([disabled]){border-radius:4px;border:1px solid var(--monop-border-neutral, #D6D6D6);background:var(--white, #FFF);width:40px;height:40px}:root .miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title .miam-recipe-catalog__content__title-icon img,:root .miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title .miam-ds-button.primary:not(.ghost):not(.disabled):not([disabled]) img{content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Caret.svg);width:24px;height:24px}:root .miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title .miam-recipe-catalog__content__title__category .size-s{color:#9e9e9e}@media(min-width:360px)and (max-width:544px){:root .miam-recipe-catalog .miam-catalog-list__cards{gap:16px;grid-template-columns:repeat(auto-fill,calc(50vw - 32px))}:root .miam-recipe-catalog .miam-catalog-list__cards .miam-recipe-card{margin:inherit;width:calc(50vw - 32px);height:70vw}}@media(min-width:544px){:root .miam-recipe-catalog .miam-recipe-card .miam-recipe-pricing__total:before{content:"soit";visibility:visible;font-size:20px;font-weight:600;line-height:24px;color:#000;margin-right:5px}:root .miam-recipe-catalog .miam-recipe-card.variant-1 .miam-recipe-pricing .miam-recipe-pricing__wrapper:before{content:"dès";visibility:visible;font-weight:500;font-size:14px;line-height:21px;color:#000;margin-right:5px}}:root .miam-catalog-list{padding:0 24px}:root .miam-catalog-list .miam-catalog-list__notFound .miam-catalog-list__notFound__icon{margin-bottom:24px}:root .miam-catalog-list .miam-catalog-list__notFound .miam-catalog-list__notFound__icon .icon-container{display:none}:root .miam-catalog-list .miam-catalog-list__notFound .miam-catalog-list__notFound__icon:after{content:"";display:block;margin:auto;height:64px;width:64px;background:center/contain no-repeat}:root .miam-catalog-list .miam-catalog-list__notFound .miam-catalog-list__notFound__icon.icon-not-filtering:after{background-image:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/HeartFill_grey.svg)}:root .miam-catalog-list .miam-catalog-list__notFound .miam-catalog-list__notFound__icon.icon-filtering:after{background-image:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Search_Big.svg)}:root .miam-catalog-list .miam-catalog-list__notFound .miam-catalog-list__notFound__title1{color:#000;font-weight:600;font-size:16px;line-height:22px;margin-top:0}:root .miam-catalog-list .miam-catalog-list__notFound .miam-catalog-list__notFound__title1.not-filtering span{display:none}:root .miam-catalog-list .miam-catalog-list__notFound .miam-catalog-list__notFound__title1.not-filtering:after{content:"Vous n’avez pas encore ajouté de repas à vos favoris"}:root .miam-catalog-list .miam-catalog-list__notFound .miam-catalog-list__notFound__title2{display:none}:root .miam-catalog-category .miam-catalog-category__header .miam-catalog-category__title{font-size:20px;line-height:24px;color:#252525;font-weight:600}:root .miam-catalog-category .miam-catalog-category__header .miam-catalog-category__header__bottom .miam-catalog-category__subtitle{font-size:14px;line-height:20px;color:#9e9e9e;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:root .miam-catalog-category .miam-catalog-category__header .miam-catalog-category__header__bottom .miam-catalog-category__link{color:#252525}:root .miam-catalog-category .miam-catalog-category__header .miam-catalog-category__header__bottom .miam-catalog-category__link img{content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Caret.svg);width:16px;height:16px;transform:rotate(180deg)}:root .miam-catalog-category .miam-catalog-category__content{padding:4px;margin-left:-4px}@media(max-width:1024px){:root .miam-catalog-category .miam-catalog-category__content{padding:4px 0 8px;margin-left:unset}}:root .miam-catalog-category .miam-catalog-category__content ng-miam-recipe-card .miam-recipe-card{margin-top:unset}:root .miam-recipe-filters .miam-modal__container.right .miam-modal.with-header .miam-modal__content-container .miam-modal__header .miam-modal__title{color:#252525}:root .miam-recipe-filters .miam-modal__container.right .miam-modal.with-header .miam-modal__content-container .miam-modal__content{padding:24px}@media(max-width:1023px){:root .miam-recipe-filters .miam-modal__container.right .miam-modal{left:unset;max-width:320px;animation-name:openRightDrawer}}@media(max-width:607px){:root .miam-recipe-filters .miam-modal__container.right .miam-modal{left:0;max-width:unset;width:100%}}:root .miam-recipe-filters .miam-modal__container.right .miam-modal .miam-modal__content-container .miam-modal__content .miam-recipe-filters__ctas .miam-ds-button{padding:4px 12px;height:48px}:root .miam-recipe-filters .miam-modal__container.right .miam-modal .miam-modal__content-container .miam-modal__content .miam-recipe-filters__ctas .miam-ds-button.ghost{color:#252525}:root .miam-recipe-filters .miam-modal__container.right .miam-modal .miam-modal__content-container .miam-modal__content .miam-recipe-filters__ctas .miam-recipe-filters__confirm{font-size:16px;font-weight:700}:root .miam-recipe-filters .miam-modal__container.right .miam-modal .miam-modal__content-container .miam-modal__content .miam-recipe-filters__ctas .miam-recipe-filters__confirm:hover{background-color:var(--miam-ds-color-primary)}:root .miam-recipe-helper__modal .miam-modal{width:600px;max-width:700px}:root .miam-toaster{background:#fff;color:#000;box-shadow:#0000004d 0 0 .357143rem,#0003 0 .357143rem .785714rem -.0714286rem;display:flex}:root .miam-toaster .miam-toaster__content{padding:unset;margin-right:unset}:root .miam-toaster .miam-toaster__content .miam-toaster__type__icon{margin-right:unset;height:34px;width:44px;box-sizing:content-box}:root .miam-toaster .miam-toaster__content .miam-toaster__type__icon.success,:root .miam-toaster .miam-toaster__content .miam-toaster__type__icon.info,:root .miam-toaster .miam-toaster__content .miam-toaster__type__icon.warning,:root .miam-toaster .miam-toaster__content .miam-toaster__type__icon.error{padding:16px;background:center/24px no-repeat url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Info.svg);background-color:#e0faf1}:root .miam-toaster .miam-toaster__content .miam-toaster__texts{margin-right:48px;padding:12px 8px}:root .miam-toaster .miam-toaster__content .miam-toaster__texts .miam-toaster__texts__title{padding-bottom:unset}:root .miam-toaster .miam-toaster__content .miam-toaster__progress-bar{background-color:#d6d6d6;height:2px;z-index:2}:root .miam-toaster .miam-toaster__content .miam-toaster__progress-bar .miam-toaster__progress-bar__filled{background-color:#00d284;height:2px}:root .miam-toaster .miam-toaster__close__icon{justify-content:flex-end;align-items:flex-start;background:center/24px no-repeat url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Cross.svg);background-color:#fff;z-index:1}:root .miam-preferences .miam-preferences__header .miam-preferences__close-button img{content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Cross_black.svg)}:root .miam-preferences .miam-preferences__guests .miam-preferences_guest-label{display:none}:root .miam-preferences .miam-preferences__guests:before{content:"Nombre de pers."}:root .miam-preferences .miam-preferences__guests .miam-preferences_guest-counter{border-radius:unset;border:unset}:root .miam-preferences .miam-preferences__guests .miam-preferences_guest-counter .miam-counter-input{padding:unset}:root .miam-preferences .miam-preferences__guests .miam-preferences_guest-counter .miam-counter-input .miam-counter-input__counter{gap:0;border-radius:4px}:root .miam-preferences .miam-preferences__guests .miam-preferences_guest-counter .miam-counter-input .miam-counter-input__counter .miam-counter-input__minus,:root .miam-preferences .miam-preferences__guests .miam-preferences_guest-counter .miam-counter-input .miam-counter-input__counter .miam-counter-input__plus{height:24px;width:44px;box-sizing:content-box}:root .miam-preferences .miam-preferences__guests .miam-preferences_guest-counter .miam-counter-input .miam-counter-input__counter .miam-counter-input__minus{background-color:var(--miam-color-secondary-light);border-radius:4px 0 0 4px;border:1px solid var(--miam-color-secondary-hover)}:root .miam-preferences .miam-preferences__guests .miam-preferences_guest-counter .miam-counter-input .miam-counter-input__counter .miam-counter-input__minus:hover{background-color:var(--miam-color-secondary-hover)}:root .miam-preferences .miam-preferences__guests .miam-preferences_guest-counter .miam-counter-input .miam-counter-input__counter .miam-counter-input__minus img{height:24px;width:24px;content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Minus.svg)}:root .miam-preferences .miam-preferences__guests .miam-preferences_guest-counter .miam-counter-input .miam-counter-input__counter .miam-counter-input__value-container{padding:8px;height:24px;width:40px;box-sizing:content-box;border-top:1px solid var(--miam-color-secondary-hover);border-bottom:1px solid var(--miam-color-secondary-hover)}:root .miam-preferences .miam-preferences__guests .miam-preferences_guest-counter .miam-counter-input .miam-counter-input__counter .miam-counter-input__value-container .miam-counter-input__value-text{text-align:center}:root .miam-preferences .miam-preferences__guests .miam-preferences_guest-counter .miam-counter-input .miam-counter-input__counter .miam-counter-input__plus{background-color:var(--miam-color-secondary);border:1px solid var(--miam-color-secondary-hover);border-radius:0 4px 4px 0}:root .miam-preferences .miam-preferences__guests .miam-preferences_guest-counter .miam-counter-input .miam-counter-input__counter .miam-counter-input__plus:hover{background-color:var(--miam-color-secondary-hover)}:root .miam-preferences .miam-preferences__guests .miam-preferences_guest-counter .miam-counter-input .miam-counter-input__counter .miam-counter-input__plus img{height:24px;width:24px;content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Plus.svg)}:root .miam-preferences .miam-preferences__dislikes-section ng-miam-accordion-content .miam-preferences__badge.checked{background-color:#252525;color:#fff}:root .miam-preferences .miam-preferences__list input:checked{background-color:#252525;border-color:#252525}:root .miam-preferences .miam-preferences__footer .miam-ds-button{padding:4px 12px;height:48px}:root .miam-preferences .miam-preferences__footer .miam-ds-button.secondary:not(.disabled):not([disabled]){border:none;flex:unset}:root ng-miam-accordion .miam-accordion__header .miam-accordion__icon{content:url(https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Caret.svg);width:24px;height:24px;transform:rotate(270deg)}:root ng-miam-accordion.opened .miam-accordion__header .miam-accordion__icon{transform:rotate(90deg)}:root{--miam-color-primary: #FD323D;--miam-color-primary-dark: #A3040E;--miam-color-primary-100: #F2F2F2;--miam-color-secondary: #FECA59;--miam-color-secondary-hover: #fdaa2d;--miam-color-secondary-light: #FEEFCD;--miam-color-secondary-lightest: #FEF8EB;--miam-color-white:#ffffff;--miam-color-black:#373737;--miam-color-neutral-black: #252525;--miam-color-success: #25D1A8;--miam-color-text-disabled: #9E9E9E;--miam-color-background-page-hover: #F2F2F2;--unavailable-color: transparent;--removed: transparent;--oftenDeleted-color: transparent;--miam-catalog-header-reduced-text-color: #252525;--miam-catalog-card-height: 436px;--miam-color-border: #DDDDDD;--miam-color-background-primary-hover: #F2F2F2}:root .miam-ds-text{font-family:ltf-etica,sans-serif;line-height:initial}:root .miam-ds-button{height:40px;padding:8px;border:none;border-radius:4px;font-family:ltf-etica,sans-serif;font-style:normal;font-weight:600;font-size:14px;line-height:16px}:root .miam-ds-button.primary:hover{background-color:var(--miam-color-primary-dark);color:var(--miam-color-white)}:root .miam-ds-button.secondary{flex:3;background-color:var(--miam-color-white);color:var(--miam-color-black)}:root .miam-ds-button.secondary:hover{background-color:#dcd9d6}:root .miam-toaster .miam-toaster__content .miam-toaster__type__icon{padding:20px 18px}:root .m-button-grey{width:160px;border-radius:4px;color:#252525;border-color:#ffb63e;background-color:#feefcd;padding:12px 8px}:root .m-button-grey:hover{background-color:#fdaa2d;color:#252525}:root .miamCatalogLinkMobile{-webkit-box-align:center;align-items:center;display:flex;-webkit-box-pack:justify;justify-content:space-between;padding:.571429rem 1.14286rem;font-size:1.14286rem;text-decoration:none!important}:root .miamCatalogLinkMobile .miamCatalogLinkMobile__container{display:flex;align-items:center}:root .miamCatalogLinkMobile .miamCatalogLinkMobile__container div img{height:20px;width:20px}:root .miamCatalogLinkMobile .miamCatalogLinkMobile__container span{display:inline;margin:0 0 0 8px;text-transform:none;visibility:inherit;text-decoration:none!important;font-size:var(--salt-text-m-font-size);line-height:var(--salt-text-m-line-height);color:var(--salt-text-color);font-family:var(--salt-text-font-family);font-weight:400}:root .miamCatalogLinkMobile .miamCatalogLinkMobile__container:hover{outline-offset:-.142857rem;background-color:var(--intent-utility-50);text-decoration:underline}:root .miamCatalogLink{display:inline-block;text-align:inherit}@media(max-width:992px){:root .miamCatalogLink{display:none}}:root .miamCatalogLink a{align-items:center;border-radius:var(--salt-radius-default);display:inline-flex;font-weight:600;gap:.5714285714rem;justify-content:center;padding-inline:.5714285714rem;position:relative;text-align:start;vertical-align:middle;inline-size:100%;background-color:transparent;color:var(--salt-button-tertiary-color);min-block-size:2rem;min-inline-size:2rem;text-decoration:none}:root .miamCatalogLink a:hover{background-color:var(--salt-button-tertiary-hover-background-color);color:var(--salt-button-tertiary-hover-color)}:root .miamCatalogLink a span{display:flex;align-items:center}:root .miam-wrapper-preview:has(.miam-basket-preview-block__lines__not-found){height:100%}')),document.head.appendChild(i)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}}();
2
+ var e=Object.defineProperty,t=(t,n,o)=>((t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o)(t,"symbol"!=typeof n?n+"":n,o);import"./mealz-injector-runtime.js";import{S as n,U as o,R as s,C as i,a}from"./mealz-injector-store-wrapper.js";import{e as r}from"./mealz-injector-environment.js";class c{constructor(e){this._overrideMiamIcon(e)}_overrideMiamIcon(e){e.forEach(e=>{window.mealz.overrideIcon(e[0],e[1])})}}class d extends c{constructor(){super([["Trash","https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Trash.svg"],["Minus","https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Minus.svg"],["Plus","https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Plus.svg"],["CheckCircleFill","https://storage.googleapis.com/assets.miam.tech/monoprix/icons/CheckCircleFill.svg"],["Hot","https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Cooking.svg"],["Cart","https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Cart.svg"]])}}class l extends n{constructor(e){super(),t(this,"_config"),this._config=e}setPos(e){throw new Error("You must implement 'setPos' for this retailer")}getPosExtId(){return"monoprix-plus"}hookCallback(e,t){return e||window.location.assign("/login?destination=%2F"),e}_searchIsAvailable(e){return e.normalize("NFD").toLowerCase()===new URLSearchParams(window.location.search).get("q").normalize("NFD").toLowerCase()}_shelfIsAvailable(e){return window.location.href.includes(e.id)}isAvailable(){const e=this._config.getAvailableShelves(),t=this._config.getAvailableSearches(),n=!!e.find(this._shelfIsAvailable),o=window.location.href.includes("search")&&!!t.find(this._searchIsAvailable.bind(this));return(window.location.href.includes("https://courses.monoprix.fr")||window.location.href.includes("https://www.rte.casino.osp.world"))&&(n||o)}availableOnPage(){const e=window.dataLayer.reverse().find(e=>e.retailerRegionId);return!e||"france"===e.retailerRegionId}}class u{constructor(e){t(this,"storeWrapper"),t(this,"productsAndCardPositions",[]),this.storeWrapper=e,this.initCardInjection()}initCardInjection(){this.productsAndCardPositions=this.cardsPositionsByScreenWidth(),this.injectCards();new MutationObserver(()=>this.injectCards()).observe(document.body,{attributes:!1,childList:!0,subtree:!0});new MutationObserver(()=>this.removeCardsIfNecessary()).observe(document.body,{attributes:!1,childList:!0,subtree:!0})}cardsPositionsByScreenWidth(){let e;const t=document.body.offsetWidth;e=t<615?[5,11,14,21]:t<800?[7,10,13,19]:t<1200?[7,12,16,21]:t<1455?[7,9,16,18]:t<1696?[7,15,16,28]:t<1936?[7,16,20,23]:[7,13,18,24];const n=document.querySelector('[data-test="product-list-ad-container"]')?.children.length?-2:0;return e.map((e,t)=>({positionOfPrecedingProduct:e+n,cardPosition:e+t+1+n}))}removeCardsIfNecessary(){(!this.storeWrapper.isAvailable()||this.areAllProductsLoading()||this.numberOfProductsPerLineChanged())&&document.querySelectorAll(".miamRecipeCardContainer").forEach(e=>e.remove())}injectCards(){if(this.storeWrapper.isAvailable()){const e=this.getCardMainContainer();e&&e.children&&this.productsAndCardPositions.forEach(e=>{this.injectCardIfNecessary(e)})}}injectCardIfNecessary(e){const t=this.getCardMainContainer(),n=this.getProductsAndCardsInList(t.children)[e.cardPosition];n&&+n.dataset.intendedPosition!==e.cardPosition&&this.insertCardAfterProduct(e)}insertCardAfterProduct(e){const t=this.getCardMainContainer(),n=this.getProductsInList(t.children),o=n[e.positionOfPrecedingProduct],s=n[e.positionOfPrecedingProduct+1];if(o&&s){let t=this.searchExistingCardForPosition(e);if(!t){const n=this.getProductsIds([o,s]);0!==n.length&&""!==n[0]&&(t=this.createCard(n),t.dataset.intendedPosition=e.cardPosition)}t&&o.after(t)}}searchExistingCardForPosition(e){return document.querySelector(`[data-intended-position="${e.cardPosition}"]`)}createCard(e){const t=document.createElement("div");t.classList.add("miamRecipeCardContainer");const n=e.map(e=>({id:e}));console.debug("[Miam] Set context with items ids:",e);const o=document.createElement("webc-miam-recipe-card");return o.productIds=n,o.displayVariant=2,o.displayInfos=!0,o.addEventListener("hide",()=>{console.debug(`[Miam] card hidden because no recipe was found for ${n}`),t.style.display="none"}),t.appendChild(o),t}getCardMainContainer(){return document.querySelector('[data-synthetics="product-list"]')||document.querySelector('[data-retailer-anchor="product-list"]')}numberOfProductsPerLineChanged(){const e=this.cardsPositionsByScreenWidth(),t=this.productsAndCardPositions?.some((t,n)=>t.cardPosition!==e[n].cardPosition)??!1;return this.productsAndCardPositions=e,t}areAllProductsLoading(){const e=this.getCardMainContainer();return!e||!this.getProductsInList(e.children).some(e=>"fop-skeleton"!==e.dataset.test)}getProductsInList(e){return Array.from(e).filter(e=>"advertising-banner"!==e.dataset.test&&"missed-promotion-alternative-text"!==e.dataset.test&&"product-list-ad-container"!==e.dataset.test&&!e.classList?.contains("miamRecipeCardContainer"))}getProductsAndCardsInList(e){return Array.from(e).filter(e=>"advertising-banner"!==e.dataset.test&&"missed-promotion-alternative-text"!==e.dataset.test&&"product-list-ad-container"!==e.dataset.test)}getProductsIds(e){return e.map(e=>{const t=e.querySelector('[data-synthetics="bop-link"]'),n=t?.href.match(/(MPX_[0-9]+)/);return n&&n[1]||""})}}function m(){null!==localStorage.getItem("miam-payment-total")&&window.mealz.basketSync.handlePayment(function(){const e=localStorage.getItem("miam-payment-total");return localStorage.removeItem("miam-payment-total"),e}())}function p(e){const t=[];e.forEach(e=>{const n=new XMLHttpRequest;n.open("GET",`/api/webproductpagews/v5/products/bop?retailerProductId=${e.id}`,!0),n.onreadystatechange=function(){g(t.map(e=>e.request))&&function(e){const t=[];e.forEach((n,o)=>{const s=new XMLHttpRequest;n.quantity>=0?s.open("POST","/api/cart/v1/carts/active/add-items",!0):(n.quantity=-n.quantity,s.open("POST","/api/cart/v1/carts/active/remove-items",!0)),s.setRequestHeader("Content-Type","application/json"),s.setRequestHeader("x-csrf-token",window.__INITIAL_STATE__.session.csrf.token),s.onreadystatechange=function(){g(t)},setTimeout(()=>s.send(JSON.stringify([n])),100*o+1),t.push(s),window.location.href.includes("ma-liste")&&o===e.length-1&&setTimeout(()=>location.assign("/content/ma-liste-merci"),100*e.length+1)})}(function(e){const t=[];return e.forEach(e=>{if(200==e.request.status){const n=JSON.parse(e.request.responseText)?.product?.productId;t.push({productId:n,quantity:e.quantity})}}),t}(t))},t.push({request:n,quantity:e.quantity})}),t.forEach(e=>{e.request.send()})}function h(){const e=[],t=new XMLHttpRequest,n=new XMLHttpRequest;if(t.open("GET","/api/v5/products/basket",!1),t.send(),n.open("GET","/api/cart/v1/carts/active/cart-view?productGroupingType=CATEGORIES",!1),n.send(),200===t.status&&200===n.status){const o=JSON.parse(t.response),s=JSON.parse(n.response);o.entities&&o.entities.product&&s.items&&s.items.forEach(t=>{const n=t.productId;o.entities.product[n]&&e.push({id:o.entities.product[n].retailerProductId,quantity:t.quantity,productId:n,price:parseFloat(o.entities.product[n].price.current.amount)})})}return e}function g(e){let t=!0;return e.forEach(function(e){4!=e.readyState&&(t=!1)}),t}class f extends s{constructor(){super(!1)}getTargetContainer(){return null}tagPlaceholders(){const e=document.querySelectorAll('[data-test^="fop-wrapper:"]');return Array.from(e).forEach(e=>{if(0==e.getElementsByClassName("miam-recipe-tag-container").length){const t=document.createRange().createContextualFragment('<div class="miam-recipe-tag-container"><div class="miam-recipe-tag-placeholder"></div></div>');e.firstChild.firstChild.children[1].appendChild(t)}}),document.getElementsByClassName("miam-recipe-tag-placeholder")}itemExtId(e){const t=e.parentElement.parentElement.parentElement.querySelector('[data-synthetics="bop-link"]'),n=t?.href.match(/(MPX_[0-9]+)/);return n&&n[1]||""}}const w={available_shelves:[],available_searches:[]};function b(e){const t=function(){const e=window.location.href,t="https://storage.googleapis.com/assets.miam.tech/monoprix/config/prod/config.json";return e.includes("https://www.rte.casino.osp.world/")?"https://storage.googleapis.com/assets.miam.tech/monoprix/config/qualif/config.json":(e.includes("https://courses.monoprix.fr/")||console.debug("Location not found, can't choose right config, using prod one"),t)}();let n=new XMLHttpRequest;n.open("GET",t),n.onload=()=>{e(JSON.parse(n.responseText))},n.onerror=()=>{e(w)},n.send()}async function y(e){const t=e.getAbCssUrl();if(t){if(console.debug("[Mealz Injector] A/B testing: config found",t),!localStorage.getItem("_miam/ab")){const e=Object.keys(t).length,n=Math.floor(Math.random()*e),o=Object.keys(t)[n];localStorage.setItem("_miam/ab",o)}const e=localStorage.getItem("_miam/ab");console.debug("[Mealz Injector] A/B testing: User set to version",e),window.mealz.analytics.setAbTestKey(e),function(e){if(!e)return void console.debug("[Mealz Injector] A/B testing: loading no css file");console.debug("[Mealz Injector] A/B testing: loading css file",e);const t=document.head,n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,t.appendChild(n)}(t[e])}else console.debug("[Mealz Injector] A/B testing: no config found"),localStorage.removeItem("_miam/ab")}function C(e){var t=location.href;let n=!1;var o=A.profilingAllowed(),s=new MutationObserver(async function(){I();document.querySelector('[data-test="basket-checkout-button"]')?n||(n=!0,function(){const e=document.querySelector('[data-test="basket-checkout-button"]');e.addEventListener("click",()=>{const e=document.getElementById("drawer-footer");let t;t=e?e.firstChild.children[1].innerHTML.split("&nbsp;")[0]:document.querySelector('[data-test="summary-items-description"]').firstChild.innerHTML.split("&nbsp;")[0];const n=t.split(","),o=parseInt(n[0])+parseInt(n[1])/100;o>=50&&o.toString()!==localStorage.getItem("miam-payment-total")&&(localStorage.setItem("miam-payment-total",o),window.mealz.paymentStarted(o))})}()):n=!1,location.href!==t&&(!function(e,t){window.location.href.includes("ma-liste")?(A.getUserId()&&window.mealz.user.loadWithExternalId(A.getUserId()).subscribe(),e.initInjector(r.monoprix.nonalSupplierId),S()):t.includes("ma-liste")&&(A.getUserId()&&window.mealz.user.loadWithExternalId(A.getUserId()).subscribe(),e.initInjector(r.monoprix.alSupplierId))}(e,t),t=location.href),window.location.href.includes("basket")&&new a(new f,!0),window.location.href.includes("page-idees-recettes")&&E(),o=function(e){const t=A.profilingAllowed();t!==e&&A.getUserId()&&window.mealz.user.loadWithExternalId(A.getUserId(),!t,!0).subscribe();return t}(o)});s.observe(document.body,{attributes:!1,childList:!0,subtree:!0})}function I(){v(),function(){if(0===document.getElementsByClassName("miamCatalogLinkMobile").length){const e=document.getElementById("nav-menu");if(e){const t=[...e.children].filter(e=>e.textContent.includes("Liste"))[0];if(t){const e=document.createElement("li");e.classList.add("nav-list-item__StyledNavListItem-sc-1j9hj7k-0","gKbaCd");const n=document.createElement("a");n.href="/content/page-idees-recettes",n.classList.add("miamCatalogLinkMobile");const o=document.createElement("div");o.classList.add("miamCatalogLinkMobile__container");const s=document.createElement("div"),i=document.createElement("img");i.setAttribute("src","https://storage.googleapis.com/assets.miam.tech/monoprix/icons/iconForkKnife.svg"),s.appendChild(i);const a=document.createElement("span");a.innerText="Idées repas",o.appendChild(s),o.appendChild(a),n.appendChild(o),e.appendChild(n),t.after(e)}}}}()}function v(e=0){if(0===document.getElementsByClassName("miamCatalogLink").length){const t=document.getElementsByTagName("header")[0].children[1].children[0];if(t){const e=document.createElement("div");e.classList.add("miamCatalogLink");const n=document.createElement("a");n.href="/content/page-idees-recettes";const o=document.createElement("span");o.innerText="Idées repas",n.appendChild(o),e.appendChild(n),t.lastElementChild.after(e)}else e<10&&setTimeout(()=>{v(e+1)},50)}}function S(e=0){if(!document.querySelector("webc-miam-list-scan")){const t=document.getElementsByClassName("row-m")[document.getElementsByClassName("row-m").length-1];if(t){const e=t.firstElementChild,n=document.createElement("webc-miam-list-scan");n.isSchoolList=!0,e.replaceWith(n)}else e<10&&setTimeout(()=>{S(e+1)},50)}}function E(e=0){if(!document.querySelector("webc-miam-recipe-catalog")){let t=document.getElementById("main");if(t?.firstChild){const e=document.createElement("webc-miam-recipe-catalog");e.displayInfos=!0,t.firstChild.appendChild(e);e.getElementsByClassName("miam-catalog-anchor")[0].scrollIntoView=function(){window.scrollTo(0,0)}}else e<10&&setTimeout(()=>{E(e+1)},50)}}function P(){const e=document.querySelector("webc-miam-recipe-modal");e.detailsStepsOnLeftSide=!0,e.detailsPricingGuestsText="/pers.",e.detailsMoreRecipesImageURL="https://storage.googleapis.com/assets.miam.tech/monoprix/images/details-additionnal-image.jpeg",e.addEventListener("hasChangesOnClose",e=>{e.detail&&function(){let e=window.location.href;const t=e.split("?")[1];if(t){const n=new URLSearchParams(t);n.delete("displayRecipe");const o=n.toString();e=o?e.replace(t,o):e.split("?")[0]}window.location.href=e}()})}const L={config:{},async initConfig(){this.config=await new Promise(e=>b(e))},getAvailableShelves(){return this.config.available_shelves},getAvailableSearches(){return this.config.available_searches},getAbCssUrl(){return this.config.ab}},A=new class extends o{analyticsAllowed(){return!0}analyticsDomain(){return r.monoprix.domain}profilingAllowed(){const e=[...window.dataLayer].reverse().findIndex(e=>"OneTrustLoaded"===e.event);return-1!==e&&window.dataLayer[window.dataLayer.length-1-e].OnetrustActiveGroups?.includes("C0003")}isUserLogged(){throw new Error("You must implement 'isUserLoged' for this retailer")}getUserId(){return window.location.href.includes("ma-liste")?window.__INITIAL_STATE__.session.metadata.customerId?window.__INITIAL_STATE__.session.metadata.customerId+"-nonal":null:window.__INITIAL_STATE__.session.metadata.customerId}};!async function(){await L.initConfig(),window.mealz.supplier.setOrigin("monoprix"),y(L),window.mealz.setDefaultScrollElementGetter(()=>document.getElementsByTagName("html")[0]);const e=new l(L);let t;if(new d,window.__INITIAL_STATE__.data.basket.unavailableData){const e=h();let t=0,n=0;e.forEach(e=>{t+=e.price*e.quantity,n+=e.quantity}),function(e,t){const n=document.querySelector("button[data-test=basket-button]"),o=n?.querySelector("span[data-test=basket-price]"),s=n?.querySelector("span[data-test=basket-counter]");o&&(o.textContent=e.toFixed(2).replace(".",",")+" €"),s&&(s.textContent=t.toString())}(t,n)}window.location.href.includes("ma-liste")?(t=new i(r.monoprix.nonalSupplierId,A,e,A.analyticsDomain()),A.getUserId()&&window.mealz.user.loadWithExternalId(A.getUserId(),!1,!0).subscribe(),S()):(t=new i(r.monoprix.alSupplierId,A,e,A.analyticsDomain()),A.getUserId()&&window.mealz.user.loadWithExternalId(A.getUserId(),!A.profilingAllowed(),!0).subscribe());window.mealz.basketSync.definePushProductsToBasket(p),m(),window.dataLayer.push=function(e){return function(t){const n=e.call(window.dataLayer,t);return t.eventAction?.includes("BASKET")&&window.mealz.basketSync.retailerBasketChanged(h()),n}}(window.dataLayer.push),void window.mealz.basketSync.retailerBasketChanged(h()),P(),function(){let e=!1,t=!1;new MutationObserver(()=>{const n=document.querySelector("[data-synthetics=basket-confirm-empty]");t&&!n?(t=!1,e=!1):!e&&n&&(t=!0,n.addEventListener("click",()=>window.mealz.basket.reset()),e=!0)}).observe(document.body,{attributes:!1,childList:!0,subtree:!0})}(),(window.location.href.includes("https://www.rte.casino.osp.world")||!A.getUserId()||e.availableOnPage())&&(window.mealz.router.setRecipeCatalogUrl("/content/page-idees-recettes"),I(),C(t),new ResizeObserver(e=>{for(const t of e)window.mealz.setStickyHeaderHeight(t.contentRect.height)}).observe(document.querySelector("#main-header")),new u(e),window.location.href.includes("basket")&&new a(new f,!0),window.location.href.includes("page-idees-recettes")&&E(),window.mealz.recipes.showConfirmationToaster(),window.mealz.features.enableGuestsInputOnMyMeals())}();
3
+ //# sourceMappingURL=mealz-injector-monoprix.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mealz-injector-monoprix.js","sources":["../src/core/wrappers/icons-wrapper.js","../src/retailers/monoprix/wrappers/monoprix-icons-wrapper.js","../src/retailers/monoprix/wrappers/monoprix-store-wrapper.js","../src/retailers/monoprix/extend/monoprix-recipe-injector.js","../src/retailers/monoprix/basket-sync.js","../src/retailers/monoprix/wrappers/monoprix-recipe-tag-wrapper.js","../src/retailers/monoprix/config/config.js","../src/retailers/monoprix/main.js","../src/retailers/monoprix/wrappers/monoprix-user-wrapper.js"],"sourcesContent":["export class IconsWrapper {\n constructor(overridesIcons) {\n this._overrideMiamIcon(overridesIcons);\n }\n\n /**\n * @optional if this function is not implemented or partialy\n * it 'll use default miam icon\n */\n _overrideMiamIcon(overridesIcons) {\n overridesIcons.forEach( tuple => {\n window.mealz.overrideIcon(tuple[0],tuple[1]);\n });\n }\n}\n","import { IconsWrapper } from \"@core\";\n\nexport class MonoprixIconsWrapper extends IconsWrapper {\n constructor() {\n const overridedIcons = [\n [\n \"Trash\",\n \"https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Trash.svg\",\n ],\n [\n \"Minus\",\n \"https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Minus.svg\",\n ],\n [\n \"Plus\",\n \"https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Plus.svg\",\n ],\n [\n \"CheckCircleFill\",\n \"https://storage.googleapis.com/assets.miam.tech/monoprix/icons/CheckCircleFill.svg\",\n ],\n [\n \"Hot\",\n \"https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Cooking.svg\",\n ],\n [\n \"Cart\",\n \"https://storage.googleapis.com/assets.miam.tech/monoprix/icons/Cart.svg\",\n ],\n ];\n super(overridedIcons);\n }\n}\n","import \"regenerator-runtime/runtime\";\nimport { StoreWrapper } from \"@core\";\n\nexport class MonoprixStoreWrappper extends StoreWrapper {\n _config;\n\n constructor(config) {\n super();\n this._config = config;\n }\n\n /**\n * Force PoS with an extId\n * for instance, this is used after url parsing in cora by setting a cookie\n * @param {string} posExtId\n */\n // eslint-disable-next-line no-unused-vars\n setPos(posExtId) {\n throw new Error(\"You must implement 'setPos' for this retailer\");\n }\n\n /**\n * @returns host POS ext_id\n */\n getPosExtId() {\n return 'monoprix-plus';\n }\n\n /**\n * action on invalid host POS (open store selector)\n */\n hookCallback(isLogged, _isPosValid) {\n if (!isLogged) {\n window.location.assign('/login?destination=%2F');\n }\n return isLogged;\n }\n\n /**\n * @returns return true if shelf corresponds to a line of AVAILABLE_SHELVES\n */\n _searchIsAvailable(key) {\n return key.normalize(\"NFD\").toLowerCase() === new URLSearchParams(window.location.search).get('q').normalize(\"NFD\").toLowerCase();\n }\n\n /**\n * @returns return true if shelf corresponds to a line of AVAILABLE_SHELVES\n */\n _shelfIsAvailable(shelf) {\n return window.location.href.includes(shelf.id);\n }\n\n /**\n * @returns true if host store add is part of AVAILABLE_SHELF\n */\n \n isAvailable() {\n const availableShelves = this._config.getAvailableShelves();\n const availableSearches = this._config.getAvailableSearches();\n const availableOnShelf = !!availableShelves.find(this._shelfIsAvailable)\n const availableOnSearch = window.location.href.includes('search') && !!availableSearches.find(this._searchIsAvailable.bind(this));\n return (\n (\n window.location.href.includes('https://courses.monoprix.fr') ||\n window.location.href.includes('https://www.rte.casino.osp.world')\n ) && (availableOnShelf || availableOnSearch)\n );\n }\n\n /**\n * to override if retailer do not use placeholder injection\n * @returns true if recipes should be injected on the page\n */\n availableOnPage() {\n // NEW : available if store not defined or is Paris (\"france\")\n const lastEvent = window.dataLayer.reverse().find(e => e.retailerRegionId)\n return (!lastEvent || lastEvent.retailerRegionId === 'france');\n \n // DEPRECATED : available if store is Paris (\"france\")\n // findLastIndex is not supported by firefox and chrome below 96\n // const lastEventIndex = window.dataLayer.reverse().findIndex(e => e.retailerRegionId === \"france\")\n // if (lastEventIndex === -1) { return false }\n\n // DEPRECATED: Recipes can be displayed if the region is France and if the slot for delivery has been chosen\n // return window.__INITIAL_STATE__.data.basket.slot && lastEventIndex > 1;\n }\n}\n","\nexport class MonoprixRecipeInjector {\n storeWrapper;\n productsAndCardPositions = [];\n\n constructor(storeWrapper) {\n this.storeWrapper = storeWrapper;\n this.initCardInjection();\n }\n\n initCardInjection() {\n this.productsAndCardPositions = this.cardsPositionsByScreenWidth();\n this.injectCards();\n const pageListenerInject = new MutationObserver(() => this.injectCards())\n pageListenerInject.observe(document.body, { attributes: false, childList: true, subtree: true });\n const pageListenerRemove = new MutationObserver(() => this.removeCardsIfNecessary())\n pageListenerRemove.observe(document.body, { attributes: false, childList: true, subtree: true });\n }\n\n /* ******************************************************* CARD POSITIONS ******************************************************** */\n\n /**\n * @returns An array of couples of the *final* positions of the cards and the *initial* position of their preceding product\n */\n cardsPositionsByScreenWidth() {\n let productsPosition;\n const tilesContainerWidth = document.body.offsetWidth;\n if (tilesContainerWidth < 615) {\n // 2 tiles by row\n productsPosition = [5, 11, 14, 21];\n } else if (tilesContainerWidth < 800) {\n // 3 tiles by row\n productsPosition = [7, 10, 13, 19];\n } else if (tilesContainerWidth < 1200) {\n // 4 tiles by row\n productsPosition = [7, 12, 16, 21];\n } else if (tilesContainerWidth < 1455) {\n // 5 tiles by row\n productsPosition = [7, 9, 16, 18];\n } else if (tilesContainerWidth < 1696) {\n // 6 tiles by row\n productsPosition = [7, 15, 16, 28];\n } else if (tilesContainerWidth < 1936) {\n // 7 tiles by row\n productsPosition = [7, 16, 20, 23];\n } else {\n // 8 or more tiles by row\n productsPosition = [7, 13, 18, 24];\n }\n\n const offset = (document.querySelector('[data-test=\"product-list-ad-container\"]')?.children.length) ? -2 : 0; \n\n // cards should be injected after products at initial position p, which makes them be in the final position p + i + 1;\n return productsPosition.map((p, i) => ({ positionOfPrecedingProduct: p + offset, cardPosition: p + i + 1 + offset }))\n }\n\n /* ******************************************************* CARD INJECTION AND REMOVAL ******************************************************** */\n\n removeCardsIfNecessary() {\n if (!this.storeWrapper.isAvailable() || this.areAllProductsLoading() || this.numberOfProductsPerLineChanged()) {\n document.querySelectorAll('.miamRecipeCardContainer').forEach(card => card.remove());\n }\n }\n\n /**\n * If we can find the product list, try to inject a card for each position\n */\n injectCards() {\n if (this.storeWrapper.isAvailable()) {\n const cardMainContainer = this.getCardMainContainer();\n if (cardMainContainer && cardMainContainer.children) {\n this.productsAndCardPositions.forEach(position => {\n this.injectCardIfNecessary(position)\n })\n }\n }\n }\n\n /**\n * If the element at position is not a recipe-card, try to add a card at the position or move the card that should be at position\n */\n injectCardIfNecessary(position) {\n const list = this.getCardMainContainer();\n const products = this.getProductsAndCardsInList(list.children);\n const productAtPosition = products[position.cardPosition];\n if (productAtPosition && (+(productAtPosition.dataset.intendedPosition) !== position.cardPosition)) {\n this.insertCardAfterProduct(position);\n }\n }\n\n /**\n * If the card for the position is on the page, move it at the position\n * Else, try to add a new card at position\n */\n insertCardAfterProduct(position) {\n const list = this.getCardMainContainer();\n const products = this.getProductsInList(list.children);\n const precedingProduct = products[position.positionOfPrecedingProduct];\n const followingProduct = products[position.positionOfPrecedingProduct + 1];\n if (precedingProduct && followingProduct) {\n // Try to get the card if already in the DOM\n let cardContainer = this.searchExistingCardForPosition(position);\n if (!cardContainer) {\n // Try to create card\n const productsIds = this.getProductsIds([precedingProduct, followingProduct]);\n if(productsIds.length !== 0 && productsIds[0] !== '') {\n cardContainer = this.createCard(productsIds);\n // Add a dataset value to keep track of where the card should be and compare with where it actually is\n cardContainer.dataset.intendedPosition = position.cardPosition; \n }\n }\n if (cardContainer) {\n precedingProduct.after(cardContainer);\n }\n }\n }\n\n searchExistingCardForPosition(position) {\n return document.querySelector(`[data-intended-position=\"${position.cardPosition}\"]`);\n }\n\n /* ******************************************************* CARD CONTAINER CREATION ******************************************************** */\n\n /**\n * Create the card and the container around it\n */\n createCard(productsIds) {\n const cardContainer = document.createElement('div');\n cardContainer.classList.add('miamRecipeCardContainer');\n\n const context = productsIds.map(p => { return { id: p }});\n console.debug('[Miam] Set context with items ids:', productsIds);\n const webcCard = document.createElement('webc-miam-recipe-card');\n webcCard.productIds = context;\n webcCard.displayVariant = 2;\n webcCard.displayInfos = true;\n webcCard.addEventListener('hide', () => {\n console.debug(`[Miam] card hidden because no recipe was found for ${context}`);\n cardContainer.style.display = 'none';\n });\n\n cardContainer.appendChild(webcCard);\n return cardContainer;\n }\n\n /* ******************************************************* UTILS ******************************************************** */\n\n /**\n * Find the product list\n */\n getCardMainContainer() {\n return document.querySelector('[data-synthetics=\"product-list\"]') || document.querySelector('[data-retailer-anchor=\"product-list\"]')\n }\n\n /**\n * @returns true if the screen size has passed a threshold that changes the number of items per line\n */\n numberOfProductsPerLineChanged() {\n const positionsForCurrentWidth = this.cardsPositionsByScreenWidth();\n const hasChanged = this.productsAndCardPositions?.some((p, i) => p.cardPosition !== positionsForCurrentWidth[i].cardPosition) ?? false;\n this.productsAndCardPositions = positionsForCurrentWidth;\n return hasChanged;\n }\n\n areAllProductsLoading() {\n const cardMainContainer = this.getCardMainContainer();\n if (!cardMainContainer) {\n return true;\n }\n return !(this.getProductsInList(cardMainContainer.children).some(x => x.dataset.test !== 'fop-skeleton'));\n }\n\n getProductsInList(list) {\n return Array.from(list)\n .filter(x =>\n x.dataset.test !== 'advertising-banner' &&\n x.dataset.test !== 'missed-promotion-alternative-text' &&\n x.dataset.test !== 'product-list-ad-container' &&\n !(x.classList?.contains('miamRecipeCardContainer'))\n );\n }\n\n getProductsAndCardsInList(list) {\n return Array.from(list)\n .filter(x =>\n x.dataset.test !== 'advertising-banner' &&\n x.dataset.test !== 'missed-promotion-alternative-text' &&\n x.dataset.test !== 'product-list-ad-container'\n );\n }\n\n getProductsIds(products) {\n return products.map(product => {\n const link = product.querySelector('[data-synthetics=\"bop-link\"]');\n const result = link?.href.match(/(MPX_[0-9]+)/);\n return result && result[1] || '';\n });\n }\n}\n","/**\n * The particularity with Monoprix's basket-sync is \n * 1. They can't develop any healper method for us so we have to call their API directly\n * 2. We never manages to make their cart update when we call their API so we have to reload the page for it to update\n * \n * This means that we must wait until after the page reloads to check the cart content after pushing products to their cart\n * \n * This will be a BIG problem if we want to upgrade Monoprix to a version of SDK > 9.0 or to SSR.\n */\n\n////////////////////////////////////////////////////\n///////////////////METHODS TO CALL//////////////////\n////////////////////////////////////////////////////\n\nexport function resetOnEmptyBasket() {\n let listenerWasAttached = false;\n let emptyButtonIsOnPage = false;\n const observer = new MutationObserver(() =>{\n const button = document.querySelector('[data-synthetics=basket-confirm-empty]');\n if (emptyButtonIsOnPage && !button) {\n emptyButtonIsOnPage = false;\n listenerWasAttached = false;\n }\n else {\n if (!listenerWasAttached && button) {\n emptyButtonIsOnPage = true;\n button.addEventListener('click', () => window.mealz.basket.reset());\n listenerWasAttached = true;\n }\n }\n });\n observer.observe(document.body, { attributes: false, childList: true, subtree: true });\n}\n\nexport function handlePayment() {\n if (hasPayment()) {\n window.mealz.basketSync.handlePayment(paymentTotal());\n }\n}\n\nexport function listenToRetailerBasket() {\n // Override window.dataLayer.push to detect changes on retailer basket\n window.dataLayer.push = function (p) {\n return function (object) {\n // In case us fetching the basket before updating dataLayer breaks their process,\n // We udpate it before fetching\n const call = p.call(window.dataLayer, object);\n // Each time Monoprix pushes in the dataLayer, if the action affect the basket,\n // fetch the basket and call the callback\n if (object.eventAction?.includes('BASKET')) {\n window.mealz.basketSync.retailerBasketChanged(getBasketProducts());\n }\n return call;\n };\n }(window.dataLayer.push);\n // Send the starting retailer basket\n window.mealz.basketSync.retailerBasketChanged(getBasketProducts());\n}\n\nexport function pushProductsToBasket(retailerProducts) {\n const getProductIdRequests = [];\n // Get all products id (we have their retailerId)\n retailerProducts.forEach(p => {\n const req = new XMLHttpRequest();\n req.open('GET', `/api/webproductpagews/v5/products/bop?retailerProductId=${p.id}`, true);\n req.onreadystatechange = function () {\n // If all queries are ready (i.e. when the last request passes here) map the good id to each product, then push them\n if (checkIfAllRequestsReady(getProductIdRequests.map(q => q.request))) {\n pushProducts(processQueries(getProductIdRequests));\n }\n };\n getProductIdRequests.push({request: req, quantity: p.quantity})\n })\n // We send all requests after setting them all up to be sure to not fall in the case where\n // for some reason all requests that were sent are ready before the other are sent\n getProductIdRequests.forEach(query => {\n query.request.send()\n })\n}\n\n// Get basket content and return it as an array of {id, quantity}\n\n// We need to make two API requests here:\n// 1. To /api/v5/products/basket for detailed product information\n// 2. To /api/cart/v1/carts/active/cart-view for current cart contents\n// This is because we need to combine data from both endpoints:\n// - Product details (like retailerProductId and price) from the first request\n// - Cart-specific information (like quantity and productId) from the second request\n// By matching productIds between these two responses, we get all the data we need\n\nexport function getBasketProducts() {\n const products = [];\n const req1 = new XMLHttpRequest();\n const req2 = new XMLHttpRequest();\n\n req1.open('GET', `/api/v5/products/basket`, false);\n req1.send();\n\n req2.open('GET', `/api/cart/v1/carts/active/cart-view?productGroupingType=CATEGORIES`, false);\n req2.send();\n\n if (req1.status === 200 && req2.status === 200) {\n const response1 = JSON.parse(req1.response);\n const response2 = JSON.parse(req2.response);\n\n if (response1.entities && response1.entities.product && response2.items) {\n response2.items.forEach(item => {\n const k = item.productId;\n if (response1.entities.product[k]) {\n products.push({\n id: response1.entities.product[k].retailerProductId,\n quantity: item.quantity,\n productId: k,\n price: parseFloat(response1.entities.product[k].price.current.amount)\n });\n }\n });\n }\n }\n\n return products;\n}\n\n///////////////////////////////////////////////\n/////////////////USEFUL METHODS////////////////\n///////////////////////////////////////////////\n\nfunction hasPayment() {\n return localStorage.getItem('miam-payment-total') !== null;\n}\n\nfunction paymentTotal() {\n const total = localStorage.getItem('miam-payment-total');\n localStorage.removeItem('miam-payment-total');\n return total;\n}\n\n/**\n * Utility method: returns true if all requests are ready, return false if at least 1 isn't\n * @param {XMLHttpRequest[]} requests\n * @returns\n */\n function checkIfAllRequestsReady(requests) {\n let finished = true;\n requests.forEach(function (request) {\n if (request.readyState != 4) {\n finished = false;\n }\n });\n return finished;\n}\n\n/**\n * Compare the quantity of items in successful queries to the quantities of items in Monopirx's basket\n * @param {XMLHttpRequest[]} getProductIdRequests\n * @returns an array of {id , quantity} with the right id of all products extracted from the queries responses\n */\nfunction processQueries(getProductIdRequests) {\n const products = []\n getProductIdRequests.forEach(query => {\n if (query.request.status == 200) {\n const id = JSON.parse(query.request.responseText)?.product?.productId;\n // Search the product in Monoprix's basket\n products.push({productId: id, quantity: query.quantity});\n }\n });\n return products;\n}\n\n/**\n * Add & remove products to Monoprix' basket\n * @param {{id: string, quantity: number}} retailerProducts\n */\nfunction pushProducts(retailerProducts) {\n const pushRequests = [];\n retailerProducts.forEach((p, i) => {\n const req = new XMLHttpRequest();\n if (p.quantity >= 0) {\n req.open('POST', `/api/cart/v1/carts/active/add-items`, true)\n }\n else {\n // The remove requests takes a positive number for the quantity to remove\n p.quantity = -p.quantity;\n req.open('POST', `/api/cart/v1/carts/active/remove-items`, true)\n }\n req.setRequestHeader(\"Content-Type\", \"application/json\");\n req.setRequestHeader(\"x-csrf-token\", window.__INITIAL_STATE__.session.csrf.token);\n req.onreadystatechange = function () {\n if (checkIfAllRequestsReady(pushRequests)) {\n // TODO: SHOULD UPDATE MONOPRIX'S BASKET (NEED THEIR METHOD)\n }\n };\n setTimeout(() => req.send(JSON.stringify([p])), 100*i + 1);\n pushRequests.push(req);\n // if we are on the scan-list page, wait after the last product request is sent and go to the after scan page\n if (window.location.href.includes('ma-liste') && i === retailerProducts.length - 1) {\n setTimeout(() => location.assign('/content/ma-liste-merci'), 100*retailerProducts.length + 1)\n }\n })\n}\n","import { RecipeTagWrapper } from '@core';\n\nexport class MonoprixRecipeTagWrapper extends RecipeTagWrapper {\n constructor() {\n super(false)\n }\n\n /**\n * No need to watch anyhting on Monoprix, the basket will not update with new products without a url change\n * @returns DomElement to watch\n */\n getTargetContainer(){\n return null;\n }\n\n /**\n * @returns the placeholder for the recipe-tags\n */\n tagPlaceholders() {\n const items = document.querySelectorAll('[data-test^=\"fop-wrapper:\"]');\n Array.from(items).forEach(item => {\n if (item.getElementsByClassName('miam-recipe-tag-container').length == 0) { // Don't insert a tag if there is one already\n const tagContainer = document.createRange().createContextualFragment(\n `<div class=\"miam-recipe-tag-container\"><div class=\"miam-recipe-tag-placeholder\"></div></div>`\n );\n item.firstChild.firstChild.children[1].appendChild(tagContainer);\n }\n });\n return document.getElementsByClassName('miam-recipe-tag-placeholder');\n }\n\n /**\n * @returns the item's extId to pass to the recipe-tags\n */\n itemExtId(placeholder) {\n const link = placeholder.parentElement.parentElement.parentElement.querySelector('[data-synthetics=\"bop-link\"]')\n const result = link?.href.match(/(MPX_[0-9]+)/);\n return result && result[1] || '';\n }\n}","import \"regenerator-runtime/runtime\";\n\nfunction configUrl() {\n const location = window.location.href;\n const qualifUrl = 'https://www.rte.casino.osp.world/';\n const prodUrl = 'https://courses.monoprix.fr/';\n const qualifBucketPath = 'https://storage.googleapis.com/assets.miam.tech/monoprix/config/qualif/config.json';\n const prodBucketPath = 'https://storage.googleapis.com/assets.miam.tech/monoprix/config/prod/config.json';\n if (location.includes(qualifUrl)) {\n return qualifBucketPath;\n } else if (location.includes(prodUrl)) {\n return prodBucketPath;\n } else {\n console.debug(\"Location not found, can't choose right config, using prod one\");\n return prodBucketPath;\n }\n}\n\nconst defaultJson = {\n 'available_shelves': [],\n 'available_searches': [],\n};\n\nfunction fetchConfig(callback) {\n const url = configUrl();\n let xhr = new XMLHttpRequest();\n xhr.open('GET', url);\n xhr.onload = () => {\n callback(JSON.parse(xhr.responseText));\n };\n xhr.onerror = () => {\n callback(defaultJson);\n };\n xhr.send();\n}\n\nexport var Config = {\n config: {},\n\n async initConfig() {\n this.config = await new Promise(resolve => fetchConfig(resolve))\n },\n\n getAvailableShelves() {\n return this.config.available_shelves;\n },\n\n getAvailableSearches() {\n return this.config.available_searches;\n },\n\n getAbCssUrl() {\n return this.config.ab;\n }\n}","import \"./style.scss\";\nimport \"regenerator-runtime/runtime\";\nimport { CoreInitializer, RecipeTagsInjector } from \"@core\";\nimport { MonoprixIconsWrapper } from \"./wrappers/monoprix-icons-wrapper\";\nimport { MonoprixStoreWrappper } from \"./wrappers/monoprix-store-wrapper\";\nimport { MonoprixUserWrapper } from \"./wrappers/monoprix-user-wrapper\";\nimport { MonoprixRecipeInjector } from \"./extend/monoprix-recipe-injector\";\nimport { handlePayment, getBasketProducts, listenToRetailerBasket, pushProductsToBasket, resetOnEmptyBasket } from \"./basket-sync\";\nimport { MonoprixRecipeTagWrapper } from \"./wrappers/monoprix-recipe-tag-wrapper\";\nimport { Config } from \"./config/config\";\nimport { env } from '../../environments/environment.js';\n\n///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n///////////////////////////////////////////////////METHODS/////////////////////////////////////////////////////////////////\n///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n\n/**\n * Setup for ABesting campains\n */\nasync function initAbTesting(config) {\n // If an a/b testing campaign is on (defined in config file)\n const abConfig = config.getAbCssUrl();\n if (abConfig) {\n console.debug('[Mealz Injector] A/B testing: config found', abConfig);\n // Define use as \"a\", \"b\", \"c\"... randomly\n // If user is already assigned a letter, let as is\n if (!localStorage.getItem('_miam/ab')) {\n const max = Object.keys(abConfig).length\n const rand = Math.floor(Math.random() * max);\n const version = Object.keys(abConfig)[rand];\n localStorage.setItem('_miam/ab', version);\n }\n\n // Configure analytics service to attach the letter to each event\n const abTestKey = localStorage.getItem('_miam/ab');\n console.debug('[Mealz Injector] A/B testing: User set to version', abTestKey);\n window.mealz.analytics.setAbTestKey(abTestKey);\n // Load the proper stylesheet using url in config file\n injectCss(abConfig[abTestKey]);\n\n // Otherwise, remove any previous a/b testing config kept in storage\n } else {\n console.debug('[Mealz Injector] A/B testing: no config found');\n localStorage.removeItem('_miam/ab');\n }\n}\n\nfunction injectCss(url) {\n // in config file, set \"a\": null to keep default version of stylesheet\n if (!url) {\n console.debug('[Mealz Injector] A/B testing: loading no css file');\n return;\n }\n\n console.debug('[Mealz Injector] A/B testing: loading css file', url);\n const head = document.head;\n const link = document.createElement(\"link\");\n\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = url;\n\n head.appendChild(link);\n}\n\n//////////////////////////////////////////////////////////\n/////////////////OPERATIONS ON URL CHANGES////////////////\n//////////////////////////////////////////////////////////\n\n/**\n * MutationObserver to check changes in URl since Monoprix is *mostly* a SPA\n * @param {*} coreInitializer an instance of CoreInitializer so we can use the initInjector method to change suppliers\n */\n function listenToUrlChange(coreInitializer) {\n var previousUrl = location.href;\n let checkoutIsListened = false;\n // let shouldRestartCardInjection = false;\n var profilingWasPermitted = userWrapper.profilingAllowed();\n var observer = new MutationObserver(async function() {\n injectCatalogLink();\n const button = document.querySelector('[data-test=\"basket-checkout-button\"]');\n // If the button is in the DOM we put a listener for checkout if it isn't already here\n if (button) {\n if (!checkoutIsListened) {\n checkoutIsListened = true;\n listenToCheckout();\n }\n }\n else {\n // If the button isn't in the DOM our listener isn't either\n checkoutIsListened = false;\n }\n if (location.href !== previousUrl) {\n manageSupplierUpdates(coreInitializer, previousUrl);\n previousUrl = location.href;\n }\n if (window.location.href.includes('basket')) {\n new RecipeTagsInjector(new MonoprixRecipeTagWrapper(), true);\n }\n if (window.location.href.includes('page-idees-recettes')) {\n injectCatalog();\n }\n profilingWasPermitted = listenToProfilingPermissions(profilingWasPermitted)\n });\n observer.observe(document.body, { attributes: false, childList: true, subtree: true })\n}\n\nfunction listenHeaderHeightChange() {\n const resizeObserver = new ResizeObserver((entries) => {\n for (const entry of entries) {\n window.mealz.setStickyHeaderHeight(entry.contentRect.height);\n }\n });\n\nresizeObserver.observe(document.querySelector('#main-header'));\n}\n\n/**\n * Inject the link for the catalog in the header\n */\n function injectCatalogLink() {\n injectCatalogLinkDesktop()\n injectCatalogLinkWebmobile()\n}\n\nfunction injectCatalogLinkDesktop(attempt = 0) {\n if(document.getElementsByClassName('miamCatalogLink').length === 0) {\n const row = document.getElementsByTagName('header')[0].children[1].children[0];\n if (row) {\n const box = document.createElement('div');\n box.classList.add('miamCatalogLink');\n\n const link = document.createElement('a');\n link.href = '/content/page-idees-recettes';\n\n const buttonContent = document.createElement('span');\n buttonContent.innerText = 'Idées repas';\n link.appendChild(buttonContent);\n box.appendChild(link);\n row.lastElementChild.after(box);\n } else if (attempt < 10) {\n // sometimes the page takes some time to initialize but we won't make more than 10 attempts to avoid infinite loop\n setTimeout(() => {\n injectCatalogLinkDesktop(attempt + 1)\n }, 50)\n }\n }\n}\n\nfunction injectCatalogLinkWebmobile() {\n if(document.getElementsByClassName('miamCatalogLinkMobile').length === 0) {\n const rowMobile = document.getElementById('nav-menu');\n if(rowMobile) {\n const listeDeCourse = [...rowMobile.children].filter(child => child.textContent.includes('Liste'))[0]\n if(listeDeCourse) { // if this tag exists you are on mobile, add the element here\n const box = document.createElement('li');\n box.classList.add('nav-list-item__StyledNavListItem-sc-1j9hj7k-0', 'gKbaCd');\n\n const link = document.createElement('a');\n link.href = '/content/page-idees-recettes';\n link.classList.add('miamCatalogLinkMobile');\n\n const container = document.createElement('div');\n container.classList.add(\"miamCatalogLinkMobile__container\")\n\n const pictoCont = document.createElement('div');\n const picto = document.createElement('img');\n picto.setAttribute('src', 'https://storage.googleapis.com/assets.miam.tech/monoprix/icons/iconForkKnife.svg')\n pictoCont.appendChild(picto);\n\n const text = document.createElement('span');\n text.innerText = 'Idées repas';\n\n container.appendChild(pictoCont);\n container.appendChild(text);\n link.appendChild(container);\n box.appendChild(link);\n listeDeCourse.after(box)\n }\n }\n }\n}\n\n/**\n * Before, when switching to the non-al supplier, we needed to switch user too, because otherwise th food basket would be mixed with the\n * non-food basket, which could cause bugs.\n * Now we don't need to switch users but no clue if it is really necessary to reload the user with loadWithExternalId...\n */\nfunction manageSupplierUpdates(coreInitializer, previousUrl) {\n if(window.location.href.includes('ma-liste')) {\n // Change the user to a non-al user to separate the non-al list and the currentList\n if (userWrapper.getUserId()) {\n window.mealz.user.loadWithExternalId(userWrapper.getUserId()).subscribe();\n }\n // Update supplier to non-food\n coreInitializer.initInjector(env.monoprix.nonalSupplierId);\n injectListScan();\n }\n // Update the supplier only if it was different before\n else if (previousUrl.includes('ma-liste')) {\n // Go back to the \"normal\" user\n if (userWrapper.getUserId()) {\n window.mealz.user.loadWithExternalId(userWrapper.getUserId()).subscribe();\n }\n // Update supplier to food\n coreInitializer.initInjector(env.monoprix.alSupplierId);\n }\n}\n\n//////////////////////////////////////////\n/////////////////LIST SCAN////////////////\n//////////////////////////////////////////\n\n/**\n * Inject the list-scan component in place of the two buttons of their page\n */\nfunction injectListScan(attempt = 0) {\n if(!document.querySelector('webc-miam-list-scan')) {\n const row = document.getElementsByClassName('row-m')[document.getElementsByClassName('row-m').length - 1];\n if(row) {\n const container = row.firstElementChild;\n const list = document.createElement('webc-miam-list-scan');\n list.isSchoolList = true;\n container.replaceWith(list);\n }\n else if (attempt < 10) {\n // sometimes the page takes some time to initialize but we won't make more than 10 attempts to avoid infinite loop\n setTimeout(() => {\n injectListScan(attempt + 1)\n }, 50)\n }\n }\n}\n\n//////////////////////////////////////////////////\n/////////////////CATALOG INJECTION////////////////\n//////////////////////////////////////////////////\n\n/**\n * Inject the link for the catalog in the header\n */\n function injectCatalog(attempt = 0) {\n if(!document.querySelector('webc-miam-recipe-catalog')) {\n let container = document.getElementById('main')\n if(container?.firstChild) {\n\n const catalogComponent = document.createElement('webc-miam-recipe-catalog');\n catalogComponent.displayInfos = true;\n container.firstChild.appendChild(catalogComponent);\n\n // Avoid header 90px offset\n const catalogAnchor = catalogComponent.getElementsByClassName('miam-catalog-anchor')[0];\n catalogAnchor.scrollIntoView = function() {\n window.scrollTo(0, 0);\n }\n }\n else if (attempt < 10) {\n // sometimes the page takes some time to initialize but we won't make more than 10 attempts to avoid infinite loop\n setTimeout(() => {\n injectCatalog(attempt + 1);\n }, 50)\n }\n }\n}\n\n////////////////////////////////////////////////\n/////////////////OTHER LISTENERS////////////////\n////////////////////////////////////////////////\n\n/**\n * Listen to click on checkout button and add total order price to localStorage\n */\nfunction listenToCheckout() {\n const button = document.querySelector('[data-test=\"basket-checkout-button\"]');\n button.addEventListener('click', () => {\n const footer = document.getElementById('drawer-footer');\n let total = undefined;\n if (footer) {\n // Get the price in span - format of innerHTML is \"00,00&nbsp;€\"\n total = footer.firstChild.children[1].innerHTML.split('&nbsp;')[0];\n }\n else {\n // Get the price in span - format of innerHTML is \"00,00&nbsp;€\"\n total = document.querySelector('[data-test=\"summary-items-description\"]').firstChild.innerHTML.split('&nbsp;')[0];\n }\n const totals = total.split(',');\n const totalPrice = parseInt(totals[0]) + parseInt(totals[1])/100;\n // You can't confirm your basket under 50€ of basket price on Monoprix\n if (totalPrice >= 50 && totalPrice.toString() !== localStorage.getItem('miam-payment-total')) {\n localStorage.setItem('miam-payment-total', totalPrice)\n window.mealz.paymentStarted(totalPrice);\n }\n })\n}\n\n/**\n * On Monoprix, changing the user's cookies permission doesn't reload the page, so we need to listen for it\n */\nfunction listenToProfilingPermissions(wasPermitted) {\n const isPermitted = userWrapper.profilingAllowed()\n if (isPermitted !== wasPermitted) {\n if (userWrapper.getUserId()) {\n window.mealz.user.loadWithExternalId(userWrapper.getUserId(), !isPermitted, true).subscribe();\n }\n }\n return isPermitted;\n}\n\n\n/**\n * We have to reload the page to update Monoprix's cart, so we reload the page if the details is closed and the basket \n * was updated while it was opened.\n */\nfunction listenToRecipeAdd() {\n const modal = document.querySelector('webc-miam-recipe-modal');\n modal.detailsStepsOnLeftSide = true;\n modal.detailsPricingGuestsText = \"/pers.\";\n modal.detailsMoreRecipesImageURL = \"https://storage.googleapis.com/assets.miam.tech/monoprix/images/details-additionnal-image.jpeg\";\n modal.addEventListener('hasChangesOnClose', (hasChanges) => {\n if (hasChanges.detail) {\n removeDisplayRecipeFromUrlQueryAndReload()\n }\n });\n}\n\n/**\n * We have to reload the page to update Monoprix's cart, but we reload the page if the details is closed and the basket \n * was updated while it was opened. So if the details opens again after reloading because the displayRecipe param was still \n * in url, the basket will be updated while it is reopened, since it will be initialized during that time.\n * So we need to prevents tjhe details from reopening after the page reload\n */\nfunction removeDisplayRecipeFromUrlQueryAndReload() {\n let url = window.location.href;\n const filteredSearch = url.split('?')[1];\n if (filteredSearch) {\n const params = new URLSearchParams(filteredSearch);\n params.delete('displayRecipe');\n const filteredQueryString = params.toString();\n if (filteredQueryString) {\n url = url.replace(filteredSearch, filteredQueryString);\n } else {\n url = url.split('?')[0];\n }\n }\n window.location.href = url\n}\n\nfunction replaceBasketTotal(price, count) {\n const bContainer = document.querySelector(\"button[data-test=basket-button]\");\n const bPrice = bContainer?.querySelector(\"span[data-test=basket-price]\");\n const bCount = bContainer?.querySelector(\"span[data-test=basket-counter]\");\n if (bPrice) {\n bPrice.textContent = price.toFixed(2).replace(\".\", \",\") + \" €\";\n }\n if (bCount) {\n bCount.textContent = count.toString();\n }\n}\n\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n///////////////////////////////////////////////////SCRIPT INIT////////////////////////////////////////////////////////////\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\nconst config = Config;\nconst userWrapper = new MonoprixUserWrapper();\ninit();\n\nasync function init() {\n await config.initConfig()\n window.mealz.supplier.setOrigin('monoprix')\n initAbTesting(config);\n window.mealz.setDefaultScrollElementGetter(() => document.getElementsByTagName('html')[0])\n const storeWrapper = new MonoprixStoreWrappper(config);\n new MonoprixIconsWrapper();\n let coreInitializer;\n /**\n * At some point, Monoprix's cart was broken on startup (after adding a recipe to cart, maybe?)\n * So this is us repairing their cart for them...\n * No clue if this is still necessary, we'd have to test\n */\n if (window.__INITIAL_STATE__.data.basket.unavailableData) {\n const products = getBasketProducts();\n let total_price = 0.00;\n let total_count = 0;\n products.forEach(p => {\n total_price += p.price * p.quantity;\n total_count += p.quantity;\n })\n replaceBasketTotal(total_price, total_count);\n }\n \n /**\n * Monoprix is the only supplier for which we have activated the list-scan feature. This feature is to be used in context\n * of buying the school supplies at the start of the year, which means we have to deal with non-food items. The way we \n * make it work is by having to supplies in DB for Monoprix: 10 - Monoprix al (food) and 11 - Monoprix non-al (non-food)\n * We switch between the two suppliers depending on the page, loading the \"non-al\" supplier only for the scan-list page.\n */\n ////////////////SUPPLIER INIT (AL / NON-AL)////////////////\n if(window.location.href.includes('ma-liste')) {\n coreInitializer = new CoreInitializer(env.monoprix.nonalSupplierId, userWrapper, storeWrapper, userWrapper.analyticsDomain());\n if (userWrapper.getUserId()) {\n window.mealz.user.loadWithExternalId(userWrapper.getUserId(), false, true).subscribe();\n }\n injectListScan();\n }\n else {\n coreInitializer = new CoreInitializer(env.monoprix.alSupplierId, userWrapper, storeWrapper, userWrapper.analyticsDomain());\n if (userWrapper.getUserId()) {\n window.mealz.user.loadWithExternalId(userWrapper.getUserId(), !userWrapper.profilingAllowed(), true).subscribe();\n }\n }\n \n ////////////////INIT BASKET SYNC////////////////\n // Map methods for baskets synchronization between Miam and me\n window.mealz.basketSync.definePushProductsToBasket(pushProductsToBasket)\n // Init baskets synchronization between Miam and me\n handlePayment();\n listenToRetailerBasket();\n listenToRecipeAdd();\n resetOnEmptyBasket();\n \n /**\n * Components are only injected if:\n * - on preprod or\n * - user is not logged or\n * - user is logged but store is not Paris\n */\n if (\n window.location.href.includes('https://www.rte.casino.osp.world') ||\n !userWrapper.getUserId() ||\n storeWrapper.availableOnPage()\n ) {\n \n ////////////////HEADER LINK INJECTION////////////////\n /**\n * On Monoprix we have to inject the link to the catalog page ourselves in header\n */\n window.mealz.router.setRecipeCatalogUrl('/content/page-idees-recettes');\n injectCatalogLink();\n \n ////////////////URL CHANGE LISTENER////////////////\n // Init MutationObserver used for all things that require a MutationObserver so we don't multiply them too much\n listenToUrlChange(coreInitializer);\n listenHeaderHeightChange();\n \n ////////////////CARDS INJECTION////////////////\n \n // Start recipe injection\n new MonoprixRecipeInjector(storeWrapper);\n \n /**\n * Inject the recipe-tags on the basket page of Monoprix. The feature is old and we do not maintain it much,\n * but Monoprix wants us to maintain it\n */\n ////////////////BASKET TAGS INJECTION////////////////\n if (window.location.href.includes('basket')) {\n new RecipeTagsInjector(new MonoprixRecipeTagWrapper(), true);\n }\n \n ////////////////CATALOG INJECTION////////////////\n if (window.location.href.includes('page-idees-recettes')) {\n injectCatalog();\n }\n \n // Monoprix have confirmation toasters for basket actions, so we show a toaster when adding a recipe to the basket\n window.mealz.recipes.showConfirmationToaster();\n window.mealz.features.enableGuestsInputOnMyMeals();\n }\n}\n","import { UserWrapper } from \"@core\";\nimport { env } from \"../../../environments/environment.js\";\n\nexport class MonoprixUserWrapper extends UserWrapper {\n\n /**\n * user has consent for analytics cookies\n * (use google analytics)\n * @returns boolean\n */\n analyticsAllowed() {\n return true;\n }\n\n /**\n * returns the domain for analytics\n */\n analyticsDomain() {\n return env.monoprix.domain;\n }\n\n /**\n * user has consent for \"function\" cookies or profiling cookies\n * (use user id)\n * @returns boolean\n */\n profilingAllowed() {\n // findLastIndex is not supported by firefox and chrome below 96\n const lastEventIndex = [...window.dataLayer].reverse().findIndex(e => e.event === 'OneTrustLoaded');\n if (lastEventIndex === -1) { return false }\n\n // The index found is based on datalayer.reverse() so it's the opposite of the one we want\n return window.dataLayer[window.dataLayer.length - 1 - lastEventIndex].OnetrustActiveGroups?.includes('C0003');\n }\n\n /**\n * @return true if user is logged\n */\n isUserLogged() {\n throw new Error(\"You must implement 'isUserLoged' for this retailer\");\n }\n\n /**\n * @returns user id for retailer\n */\n getUserId() {\n if(window.location.href.includes('ma-liste')) {\n return window.__INITIAL_STATE__.session.metadata.customerId ? window.__INITIAL_STATE__.session.metadata.customerId + '-nonal' : null;\n }\n else {\n return window.__INITIAL_STATE__.session.metadata.customerId;\n }\n }\n}\n"],"names":["IconsWrapper","constructor","overridesIcons","this","_overrideMiamIcon","forEach","tuple","window","mealz","overrideIcon","MonoprixIconsWrapper","super","MonoprixStoreWrappper","StoreWrapper","config","__publicField","_config","setPos","posExtId","Error","getPosExtId","hookCallback","isLogged","_isPosValid","location","assign","_searchIsAvailable","key","normalize","toLowerCase","URLSearchParams","search","get","_shelfIsAvailable","shelf","href","includes","id","isAvailable","availableShelves","getAvailableShelves","availableSearches","getAvailableSearches","availableOnShelf","find","availableOnSearch","bind","availableOnPage","lastEvent","dataLayer","reverse","e","retailerRegionId","MonoprixRecipeInjector","storeWrapper","initCardInjection","productsAndCardPositions","cardsPositionsByScreenWidth","injectCards","MutationObserver","observe","document","body","attributes","childList","subtree","removeCardsIfNecessary","productsPosition","tilesContainerWidth","offsetWidth","offset","querySelector","children","length","map","p","i","positionOfPrecedingProduct","cardPosition","areAllProductsLoading","numberOfProductsPerLineChanged","querySelectorAll","card","remove","cardMainContainer","getCardMainContainer","position","injectCardIfNecessary","list","productAtPosition","getProductsAndCardsInList","dataset","intendedPosition","insertCardAfterProduct","products","getProductsInList","precedingProduct","followingProduct","cardContainer","searchExistingCardForPosition","productsIds","getProductsIds","createCard","after","createElement","classList","add","context","console","debug","webcCard","productIds","displayVariant","displayInfos","addEventListener","style","display","appendChild","positionsForCurrentWidth","hasChanged","some","x","test","Array","from","filter","contains","product","link","result","match","handlePayment","localStorage","getItem","basketSync","total","removeItem","paymentTotal","pushProductsToBasket","retailerProducts","getProductIdRequests","req","XMLHttpRequest","open","onreadystatechange","checkIfAllRequestsReady","q","request","pushRequests","quantity","setRequestHeader","__INITIAL_STATE__","session","csrf","token","setTimeout","send","JSON","stringify","push","pushProducts","query","status","parse","responseText","productId","processQueries","getBasketProducts","req1","req2","response1","response","response2","entities","items","item","k","retailerProductId","price","parseFloat","current","amount","requests","finished","readyState","MonoprixRecipeTagWrapper","RecipeTagWrapper","getTargetContainer","tagPlaceholders","getElementsByClassName","tagContainer","createRange","createContextualFragment","firstChild","itemExtId","placeholder","parentElement","defaultJson","available_shelves","available_searches","fetchConfig","callback","url","prodBucketPath","configUrl","xhr","onload","onerror","async","initAbTesting","abConfig","getAbCssUrl","max","Object","keys","rand","Math","floor","random","version","setItem","abTestKey","analytics","setAbTestKey","head","type","rel","injectCss","listenToUrlChange","coreInitializer","previousUrl","checkoutIsListened","profilingWasPermitted","userWrapper","profilingAllowed","observer","injectCatalogLink","button","footer","getElementById","innerHTML","split","totals","totalPrice","parseInt","toString","paymentStarted","listenToCheckout","getUserId","user","loadWithExternalId","subscribe","initInjector","env","monoprix","nonalSupplierId","injectListScan","alSupplierId","manageSupplierUpdates","RecipeTagsInjector","injectCatalog","wasPermitted","isPermitted","listenToProfilingPermissions","injectCatalogLinkDesktop","rowMobile","listeDeCourse","child","textContent","box","container","pictoCont","picto","setAttribute","text","innerText","injectCatalogLinkWebmobile","attempt","row","getElementsByTagName","buttonContent","lastElementChild","firstElementChild","isSchoolList","replaceWith","catalogComponent","scrollIntoView","scrollTo","listenToRecipeAdd","modal","detailsStepsOnLeftSide","detailsPricingGuestsText","detailsMoreRecipesImageURL","hasChanges","detail","filteredSearch","params","delete","filteredQueryString","replace","removeDisplayRecipeFromUrlQueryAndReload","initConfig","Promise","resolve","ab","UserWrapper","analyticsAllowed","analyticsDomain","domain","lastEventIndex","findIndex","event","OnetrustActiveGroups","isUserLogged","metadata","customerId","supplier","setOrigin","setDefaultScrollElementGetter","data","basket","unavailableData","total_price","total_count","count","bContainer","bPrice","bCount","toFixed","replaceBasketTotal","CoreInitializer","definePushProductsToBasket","object","call","eventAction","retailerBasketChanged","listenerWasAttached","emptyButtonIsOnPage","reset","resetOnEmptyBasket","router","setRecipeCatalogUrl","ResizeObserver","entries","entry","setStickyHeaderHeight","contentRect","height","recipes","showConfirmationToaster","features","enableGuestsInputOnMyMeals","init"],"mappings":"+TAAO,MAAMA,EACX,WAAAC,CAAYC,GACVC,KAAKC,kBAAkBF,EACzB,CAMC,iBAAAE,CAAkBF,GACjBA,EAAeG,QAASC,IACtBC,OAAOC,MAAMC,aAAaH,EAAM,GAAGA,EAAM,KAE7C,ECXK,MAAMI,UAA6BV,EACxC,WAAAC,GA2BEU,MA1BuB,CACrB,CACE,QACA,4EAEF,CACE,QACA,4EAEF,CACE,OACA,2EAEF,CACE,kBACA,sFAEF,CACE,MACA,8EAEF,CACE,OACA,4EAIN,EC5BK,MAAMC,UAA8BC,EAGzC,WAAAZ,CAAYa,GACVH,QAHFI,EAAAZ,KAAA,WAIEA,KAAKa,QAAUF,CACjB,CAQA,MAAAG,CAAOC,GACL,MAAM,IAAIC,MAAM,gDAClB,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IASE5U,OAAOiB,SAASW,KAAKC,SAAS,sCAC7BqM,EAAYe,aACblM,EAAaP,qBAObxC,OAAOC,MAAM4U,OAAOC,oBAAoB,gCACxCzG,IAIAR,EAAkBC,GA9UG,IAAIiH,eAAgBC,IACzC,IAAA,MAAWC,KAASD,EAClBhV,OAAOC,MAAMiV,sBAAsBD,EAAME,YAAYC,UAI5C/R,QAAQC,SAASU,cAAc,iBA8U1C,IAAIlB,EAAuBC,GAOvB/C,OAAOiB,SAASW,KAAKC,SAAS,WAChC,IAAI+N,EAAmB,IAAI1E,GAA4B,GAIrDlL,OAAOiB,SAASW,KAAKC,SAAS,wBAChCgO,IAIF7P,OAAOC,MAAMoV,QAAQC,0BACrBtV,OAAOC,MAAMsV,SAASC,6BAE1B,CAvGAC"}
@@ -0,0 +1,2 @@
1
+ var t,r={exports:{}};t||(t=1,function(){var t=function(t){var r,e=Object.prototype,n=e.hasOwnProperty,o=Object.defineProperty||function(t,r,e){t[r]=e.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function h(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{h({},"")}catch(F){h=function(t,r,e){return t[r]=e}}function l(t,r,e,n){var i=r&&r.prototype instanceof d?r:d,a=Object.create(i.prototype),c=new T(n||[]);return o(a,"_invoke",{value:O(t,e,c)}),a}function f(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(F){return{type:"throw",arg:F}}}t.wrap=l;var s="suspendedStart",p="suspendedYield",y="executing",v="completed",g={};function d(){}function m(){}function w(){}var b={};h(b,a,function(){return this});var L=Object.getPrototypeOf,x=L&&L(L(P([])));x&&x!==e&&n.call(x,a)&&(b=x);var E=w.prototype=d.prototype=Object.create(b);function _(t){["next","throw","return"].forEach(function(r){h(t,r,function(t){return this._invoke(r,t)})})}function j(t,r){function e(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var h=u.arg,l=h.value;return l&&"object"==typeof l&&n.call(l,"__await")?r.resolve(l.__await).then(function(t){e("next",t,a,c)},function(t){e("throw",t,a,c)}):r.resolve(l).then(function(t){h.value=t,a(h)},function(t){return e("throw",t,a,c)})}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new r(function(r,o){e(t,n,r,o)})}return i=i?i.then(o,o):o()}})}function O(t,e,n){var o=s;return function(i,a){if(o===y)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:r,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=k(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===s)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var h=f(t,e,n);if("normal"===h.type){if(o=n.done?v:p,h.arg===g)continue;return{value:h.arg,done:n.done}}"throw"===h.type&&(o=v,n.method="throw",n.arg=h.arg)}}}function k(t,e){var n=e.method,o=t.iterator[n];if(o===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,k(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=f(o,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,g;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,g):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function G(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function N(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(G,this),this.reset(!0)}function P(t){if(null!=t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function e(){for(;++o<t.length;)if(n.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=r,e.done=!0,e};return i.next=i}}throw new TypeError(typeof t+" is not iterable")}return m.prototype=w,o(E,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:m,configurable:!0}),m.displayName=h(w,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===m||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,h(t,u,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},_(j.prototype),h(j.prototype,c,function(){return this}),t.AsyncIterator=j,t.async=function(r,e,n,o,i){void 0===i&&(i=Promise);var a=new j(l(r,e,n,o),i);return t.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},_(E),h(E,u,"Generator"),h(E,a,function(){return this}),h(E,"toString",function(){return"[object Generator]"}),t.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=P,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(N),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),h=n.call(a,"finallyLoc");if(u&&h){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),N(e),g}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;N(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:P(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),g}},t}(r.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}());
2
+ //# sourceMappingURL=mealz-injector-runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mealz-injector-runtime.js","sources":["../node_modules/regenerator-runtime/runtime.js"],"sourcesContent":["/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; };\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n defineProperty(generator, \"_invoke\", { value: makeInvokeMethod(innerFn, self, context) });\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n defineProperty(Gp, \"constructor\", { value: GeneratorFunctionPrototype, configurable: true });\n defineProperty(\n GeneratorFunctionPrototype,\n \"constructor\",\n { value: GeneratorFunction, configurable: true }\n );\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n defineProperty(this, \"_invoke\", { value: enqueue });\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per GeneratorResume behavior specified since ES2015:\n // ES2015 spec, step 3: https://262.ecma-international.org/6.0/#sec-generatorresume\n // Latest spec, step 2: https://tc39.es/ecma262/#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var methodName = context.method;\n var method = delegate.iterator[methodName];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method, or a missing .next method, always terminate the\n // yield* loop.\n context.delegate = null;\n\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (methodName === \"throw\" && delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n if (methodName !== \"return\") {\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a '\" + methodName + \"' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(val) {\n var object = Object(val);\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable != null) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n throw new TypeError(typeof iterable + \" is not iterable\");\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n"],"names":["runtime","exports","undefined","Op","Object","prototype","hasOwn","hasOwnProperty","defineProperty","obj","key","desc","value","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","makeInvokeMethod","tryCatch","fn","arg","type","call","GenStateSuspendedStart","GenStateSuspendedYield","GenStateExecuting","GenStateCompleted","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","method","_invoke","AsyncIterator","PromiseImpl","invoke","resolve","reject","record","result","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","state","Error","done","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","methodName","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","val","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","catch","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function"],"mappings":"wCAOA,IAAIA,EAAAA,SAAqBC,GAGvB,IAGIC,EAHAC,EAAKC,OAAOC,UACZC,EAASH,EAAGI,eACZC,EAAiBJ,OAAOI,gBAAkB,SAAUC,EAAKC,EAAKC,GAAQF,EAAI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,IAAI3B,EAAS0B,EAAMQ,WACnB,GAAoB,UAAhBlC,EAAOzB,KAAkB,CAC3B,IAAIqG,EAAS5E,EAAO1B,IACpB2D,EAAcP,EAC1B,CACU,OAAOkD,CACjB,CACA,CAIM,MAAM,IAAInE,MAAM,wBACtB,EAEIoE,cAAe,SAASzC,EAAUf,EAAYE,GAa5C,OAZAtC,KAAK0B,SAAW,CACd7D,SAAUuC,EAAO+C,GACjBf,aACAE,WAGkB,SAAhBtC,KAAKQ,SAGPR,KAAKX,IAAMtC,GAGN6C,CACb,GAOS9C,CAET,CAvtBID,GA4tBkCC,SAGtC,IACE+I,mBAAqBhJ,CACvB,OAASiJ,GAWmB,iBAAfC,WACTA,WAAWF,mBAAqBhJ,EAEhCmJ,SAAS,IAAK,yBAAdA,CAAwCnJ,EAE5C","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ var e=Object.defineProperty,t=(t,r,i)=>((t,r,i)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i)(t,"symbol"!=typeof r?r+"":r,i);class r{constructor(e,r=!1){t(this,"_recipeTagWrapper"),t(this,"_reduce"),this._recipeTagWrapper=e,this._reduce=r,this.initListMutationObserver()}initListMutationObserver(){if(this._recipeTagWrapper.getTargetContainer()){const e={attributes:!1,childList:!0,subtree:!0};new MutationObserver(this.injectRecipesTags.bind(this)).observe(this._recipeTagWrapper.getTargetContainer(),e)}this.injectRecipesTags()}injectRecipesTags(){const e=this._recipeTagWrapper.tagPlaceholders();for(;e.length>0;)this.initRecipeTag(e[0])}initRecipeTag(e){const t=document.createElement("webc-miam-recipe-tags"),r=this._recipeTagWrapper.itemExtId(e);t.recipeDetailPreviewAllowed=this._recipeTagWrapper.recipeDetailPreviewAllowed,t.extId=r,t.reduce=this._reduce,e.replaceWith(t)}}class i{constructor(e,r,i,o){t(this,"_userWrapper"),t(this,"_storeWrapper"),t(this,"_lastSupplierId"),this._userWrapper=r,this._storeWrapper=i,this.initAnalytics(o),this.initInjector(e)}initAnalytics(e){window.mealz.analytics.init(e)}initInjector(e){if(e!==this._lastSupplierId){window.mealz.hook.setHookCallback((e,t)=>this._storeWrapper.hookCallback(e,t)),window.mealz.hook.setForcePosCallback(e=>this._storeWrapper.forcePosCallback(e)),window.mealz.supplier.load(e);const t=this._storeWrapper.getPosExtId();t.length>0?window.mealz.pos.load(t):window.mealz.pos.load(void 0),this._lastSupplierId=e}}}class o{constructor(){}analyticsAllowed(){throw new Error("You must implement 'analyticsAllowed' for this retailer")}analyticsDomain(){throw new Error("You must implement 'analyticsAllowed' for this retailer")}profilingAllowed(){throw new Error("You must implement 'profilingAllowed' for this retailer")}isUserLogged(){throw new Error("You must implement 'isUserLoged' for this retailer")}getUserId(){throw new Error("You must implement 'getUserId' for this retailer")}}class s{constructor(e=!0){t(this,"recipeDetailPreviewAllowed"),this.recipeDetailPreviewAllowed=e}getTargetContainer(){throw new Error("You must implement 'getTargetContainer' for this retailer")}tagPlaceholders(){throw new Error("You must implement 'tagPlaceholders' for this retailer")}itemExtId(){throw new Error("You must implement 'itemExtId' for this retailer")}}class a{setPos(e){throw new Error("You must implement 'setPos' for this retailer")}getPosExtId(){throw new Error("You must implement 'getPosExtId' for this retailer")}hookCallback(){throw new Error("You must implement 'hookCallback' for this retailer")}forcePosCallback(){console.warn("[Miam] Injector: forcePosCallback not defined - basket trandfer from third parties will not be available")}isAvailable(){return window.mealz.user?.device.matchMedia("(min-width: 1023px)").matches}availableOnPage(){return!0}}export{i as C,s as R,a as S,o as U,r as a};
2
+ //# sourceMappingURL=mealz-injector-store-wrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mealz-injector-store-wrapper.js","sources":["../src/core/common/recipe-tags-injector.js","../src/core/common/core-initializer.js","../src/core/wrappers/user-wrapper.js","../src/core/wrappers/recipe-tag-wrapper.js","../src/core/wrappers/store-wrapper.js"],"sourcesContent":["// --------------------------------------------------------------------------------------------\n// --- HANDLE DISPLAY OF REFERENCES TO RECIPES IN BASKET --------------------------------------\n// --------------------------------------------------------------------------------------------\n\nexport class RecipeTagsInjector {\n _recipeTagWrapper;\n _reduce;\n\n constructor(wrapper, reduce = false) {\n this._recipeTagWrapper = wrapper;\n this._reduce = reduce;\n this.initListMutationObserver();\n }\n\n /**\n * Init mutation Observer that will watch changes on\n * targetContainer and call injectRecipesTags method\n * each time a change is detected and one time at init\n */\n initListMutationObserver() {\n const targetcontainer = this._recipeTagWrapper.getTargetContainer();\n if(targetcontainer){\n const observedAtts = { attributes: false, childList: true, subtree: true };\n const listMutationObserver = new MutationObserver(\n this.injectRecipesTags.bind(this)\n );\n listMutationObserver.observe(this._recipeTagWrapper.getTargetContainer(), observedAtts);\n // console.debug('[Miam] dom lister init',listMutationObserver);\n }\n this.injectRecipesTags();\n }\n\n /**\n * replace placeholder div with class miamRecipesTag with our tag's component\n */\n injectRecipesTags() {\n const recipesTagsPlaceHolders = this._recipeTagWrapper.tagPlaceholders();\n while (recipesTagsPlaceHolders.length > 0) {\n // this will replace the placeholder and so decrease the recipesTagsPlaceHolders list\n this.initRecipeTag(recipesTagsPlaceHolders[0]);\n }\n }\n \n /**\n * Replace placeholder with miam-recipe-tag element \n * set input with data-context content\n * @param {DOMElement} placeholder \n */\n initRecipeTag(placeholder) {\n const recipeTagEl = document.createElement('webc-miam-recipe-tags');\n const extID = this._recipeTagWrapper.itemExtId(placeholder);\n recipeTagEl.recipeDetailPreviewAllowed = this._recipeTagWrapper.recipeDetailPreviewAllowed;\n recipeTagEl.extId = extID;\n recipeTagEl.reduce = this._reduce;\n placeholder.replaceWith(recipeTagEl);\n }\n}\n","/**\n * This Class have to be extend for each\n * retailers it provide function witch have to implement\n */\nexport class CoreInitializer {\n\n _userWrapper\n _storeWrapper\n _lastSupplierId\n\n\n /**\n * @param {string} supplierId id of supplier in miam API\n * @param {Class} basketHandlerClass class use for _basketHandler default is core class\n * it can be override to add custom behaviour\n */\n constructor(supplierId, userWrapper, storeWrapper, analyticsDomain) {\n this._userWrapper = userWrapper;\n this._storeWrapper = storeWrapper;\n this.initAnalytics(analyticsDomain);\n this.initInjector(supplierId);\n }\n\n /**\n * Enable Miam analytics if user authorized performance cookies\n */\n initAnalytics(analyticsDomain) {\n window.mealz.analytics.init(analyticsDomain);\n }\n\n /**\n * @generic\n * @param {string} supplierId id of supplier in miam API\n */\n initInjector(supplierId) {\n if (supplierId !== this._lastSupplierId) {\n window.mealz.hook.setHookCallback((isLogged, isPosValid) => {\n return this._storeWrapper.hookCallback(isLogged, isPosValid);\n });\n window.mealz.hook.setForcePosCallback((posExtId) => {\n return this._storeWrapper.forcePosCallback(posExtId);\n });\n window.mealz.supplier.load(supplierId);\n const extId = this._storeWrapper.getPosExtId();\n if (extId.length > 0) {\n window.mealz.pos.load(extId);\n }\n else {\n window.mealz.pos.load(undefined);\n }\n this._lastSupplierId = supplierId;\n }\n }\n}\n","export class UserWrapper {\n constructor() {}\n\n /**\n * user has consent for analytics cookies\n * (use google analytics)\n * @returns boolean\n */\n analyticsAllowed() {\n throw new Error(\"You must implement 'analyticsAllowed' for this retailer\");\n }\n\n /**\n * returns the domain for analytics\n */\n analyticsDomain() {\n throw new Error(\"You must implement 'analyticsAllowed' for this retailer\");\n }\n\n /**\n * user has consent for \"function\" cookies or profiling cookies\n * (use user id)\n * @returns boolean\n */\n profilingAllowed() {\n throw new Error(\"You must implement 'profilingAllowed' for this retailer\");\n }\n\n /**\n * @return true if user is logged\n */\n isUserLogged() {\n throw new Error(\"You must implement 'isUserLoged' for this retailer\");\n }\n\n /**\n * @returns user id for retailer\n */\n getUserId() {\n throw new Error(\"You must implement 'getUserId' for this retailer\");\n }\n}\n","export class RecipeTagWrapper {\n // true if use can acces basket preview form tags\n recipeDetailPreviewAllowed;\n\n constructor(recipeDetailPreviewAllowed = true) {\n this.recipeDetailPreviewAllowed = recipeDetailPreviewAllowed;\n }\n\n /**\n * @returns DomElement to watch\n */\n getTargetContainer(){\n throw new Error(\"You must implement 'getTargetContainer' for this retailer\");\n }\n\n /**\n * @returns the placeholder for the recipe-tags\n */\n tagPlaceholders() {\n throw new Error(\"You must implement 'tagPlaceholders' for this retailer\");\n }\n\n /**\n * @returns the item's extId to pass to the recipe-tags\n */\n itemExtId() {\n throw new Error(\"You must implement 'itemExtId' for this retailer\");\n }\n}\n","export class StoreWrapper {\n /**\n * Force PoS with an extId\n * for instance, this is used after url parsing in cora by setting a cookie\n * @param {string} posExtId\n */\n // eslint-disable-next-line no-unused-vars\n setPos(posExtId) {\n throw new Error(\"You must implement 'setPos' for this retailer\");\n }\n\n /**\n * @returns host POS ext_id\n */\n getPosExtId() {\n throw new Error(\"You must implement 'getPosExtId' for this retailer\");\n }\n\n /**\n * action on invalid host POS (open store selector)\n */\n hookCallback() {\n throw new Error(\n \"You must implement 'hookCallback' for this retailer\"\n );\n }\n\n /**\n * force change pos\n */\n forcePosCallback() {\n console.warn('[Miam] Injector: forcePosCallback not defined - basket trandfer from third parties will not be available');\n }\n\n\n /**\n * @returns true if host store add is part of AVAILABLE_SHELF\n */\n \n isAvailable() {\n return window.mealz.user?.device.matchMedia(\"(min-width: 1023px)\").matches;\n }\n\n /**\n * to override if retailer do not use placeholder injection\n * @returns true if recipes should be injected on the page\n */\n availableOnPage() {\n return true;\n }\n}\n"],"names":["RecipeTagsInjector","constructor","wrapper","reduce","__publicField","this","_recipeTagWrapper","_reduce","initListMutationObserver","getTargetContainer","observedAtts","attributes","childList","subtree","MutationObserver","injectRecipesTags","bind","observe","recipesTagsPlaceHolders","tagPlaceholders","length","initRecipeTag","placeholder","recipeTagEl","document","createElement","extID","itemExtId","recipeDetailPreviewAllowed","extId","replaceWith","CoreInitializer","supplierId","userWrapper","storeWrapper","analyticsDomain","_userWrapper","_storeWrapper","initAnalytics","initInjector","window","mealz","analytics","init","_lastSupplierId","hook","setHookCallback","isLogged","isPosValid","hookCallback","setForcePosCallback","posExtId","forcePosCallback","supplier","load","getPosExtId","pos","UserWrapper","analyticsAllowed","Error","profilingAllowed","isUserLogged","getUserId","RecipeTagWrapper","StoreWrapper","setPos","console","warn","isAvailable","user","device","matchMedia","matches","availableOnPage"],"mappings":"0JAIO,MAAMA,EAIX,WAAAC,CAAYC,EAASC,GAAS,GAH9BC,EAAAC,KAAA,qBACAD,EAAAC,KAAA,WAGEA,KAAKC,kBAAoBJ,EACzBG,KAAKE,QAAUJ,EACfE,KAAKG,0BACP,CAOG,wBAAAA,GAEC,GADwBH,KAAKC,kBAAkBG,qBAC5B,CACjB,MAAMC,EAAe,CAAEC,YAAY,EAAOC,WAAW,EAAMC,SAAS,GACvC,IAAIC,iBAC/BT,KAAKU,kBAAkBC,KAAKX,OAETY,QAAQZ,KAAKC,kBAAkBG,qBAAsBC,EAE5E,CACAL,KAAKU,mBACP,CAKD,iBAAAA,GACC,MAAMG,EAA0Bb,KAAKC,kBAAkBa,kBACvD,KAAOD,EAAwBE,OAAS,GAEtCf,KAAKgB,cAAcH,EAAwB,GAE/C,CAOA,aAAAG,CAAcC,GACZ,MAAMC,EAAcC,SAASC,cAAc,yBACrCC,EAAQrB,KAAKC,kBAAkBqB,UAAUL,GAC/CC,EAAYK,2BAA6BvB,KAAKC,kBAAkBsB,2BAChEL,EAAYM,MAAQH,EACpBH,EAAYpB,OAASE,KAAKE,QAC1Be,EAAYQ,YAAYP,EAC1B,ECnDK,MAAMQ,EAYX,WAAA9B,CAAY+B,EAAYC,EAAaC,EAAcC,GAVnD/B,EAAAC,KAAA,gBACAD,EAAAC,KAAA,iBACAD,EAAAC,KAAA,mBASEA,KAAK+B,aAAeH,EACpB5B,KAAKgC,cAAgBH,EACrB7B,KAAKiC,cAAcH,GACnB9B,KAAKkC,aAAaP,EACpB,CAKA,aAAAM,CAAcH,GACZK,OAAOC,MAAMC,UAAUC,KAAKR,EAC9B,CAMA,YAAAI,CAAaP,GACX,GAAIA,IAAe3B,KAAKuC,gBAAiB,CACvCJ,OAAOC,MAAMI,KAAKC,gBAAgB,CAACC,EAAUC,IACpC3C,KAAKgC,cAAcY,aAAaF,EAAUC,IAEnDR,OAAOC,MAAMI,KAAKK,oBAAqBC,GAC9B9C,KAAKgC,cAAce,iBAAiBD,IAE7CX,OAAOC,MAAMY,SAASC,KAAKtB,GAC3B,MAAMH,EAAQxB,KAAKgC,cAAckB,cAC7B1B,EAAMT,OAAS,EACjBoB,OAAOC,MAAMe,IAAIF,KAAKzB,GAGtBW,OAAOC,MAAMe,IAAIF,UAAK,GAExBjD,KAAKuC,gBAAkBZ,CACzB,CACF,ECpDK,MAAMyB,EACX,WAAAxD,GAAe,CAOf,gBAAAyD,GACE,MAAM,IAAIC,MAAM,0DAClB,CAKA,eAAAxB,GACE,MAAM,IAAIwB,MAAM,0DAClB,CAOA,gBAAAC,GACE,MAAM,IAAID,MAAM,0DAClB,CAKA,YAAAE,GACE,MAAM,IAAIF,MAAM,qDAClB,CAKA,SAAAG,GACE,MAAM,IAAIH,MAAM,mDAClB,ECxCK,MAAMI,EAIX,WAAA9D,CAAY2B,GAA6B,GAFzCxB,EAAAC,KAAA,8BAGEA,KAAKuB,2BAA6BA,CACpC,CAKC,kBAAAnB,GACC,MAAM,IAAIkD,MAAM,4DACjB,CAKD,eAAAxC,GACE,MAAM,IAAIwC,MAAM,yDAClB,CAKA,SAAAhC,GACE,MAAM,IAAIgC,MAAM,mDAClB,EC3BK,MAAMK,EAOX,MAAAC,CAAOd,GACL,MAAM,IAAIQ,MAAM,gDAClB,CAKA,WAAAJ,GACE,MAAM,IAAII,MAAM,qDAClB,CAKA,YAAAV,GACE,MAAM,IAAIU,MACR,sDAEJ,CAKA,gBAAAP,GACEc,QAAQC,KAAK,2GACf,CAOA,WAAAC,GACE,OAAO5B,OAAOC,MAAM4B,MAAMC,OAAOC,WAAW,uBAAuBC,OACrE,CAMA,eAAAC,GACE,OAAO,CACT"}
package/package.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "mealz-injector",
3
+ "version": "2.0.0",
4
+ "author": "Miam",
5
+ "repository": {
6
+ "type": "git"
7
+ },
8
+ "license": "GNU GPLv3",
9
+ "keywords": [],
10
+ "description": ""
11
+ }