PageSourceSearch

https://www.chicimama.com/cdn/shop/t/9/assets/custom.js?v=11410623700546696561791208789

js chicimama.com collected 2026-10-08 17:09:52 UTC 8,005 bytes, 20 lines download raw bytes

1(function(){const a11y=()=>window.theme&&window.theme.a11y||null,closePopup=popup=>{if(!popup.classList.contains("active"))return;popup.classList.remove("active");const helper=a11y();helper?helper.removeTrapFocus({container:popup}):popup.__trigger&&popup.__trigger.focus()},openPopup=(popup,trigger)=>{popup.classList.add("active"),popup.__trigger=trigger;const helper=a11y();helper&&(helper.state.trigger=trigger,requestAnimationFrame(()=>{helper.trapFocus({container:popup,elementToFocus:popup.querySelector(".modal-close")||popup})}))};document.querySelectorAll('.image-with-text__popup a[href^="#popup-"]').forEach(trigger=>{trigger.addEventListener("click",e=>{e.preventDefault();const popup=document.querySelector(trigger.getAttribute("href"));popup&&openPopup(popup,trigger)})}),document.querySelectorAll(".image-with-text__popup-modal").forEach(popup=>{popup.addEventListener("click",e=>{(e.target===popup||e.target.closest(".modal-close"))&&closePopup(popup)}),popup.addEventListener("keydown",e=>{e.key==="Escape"&&(e.stopPropagation(),closePopup(popup))})}),document.querySelectorAll(".image-with-text__popup-backdrop").forEach(backdrop=>{backdrop.addEventListener("click",()=>{const popup=backdrop.previousElementSibling;popup&&closePopup(popup)})});const membershipHighlights=()=>{const sections=document.querySelectorAll(".section-membership-highlights");sections.length<1||sections.forEach(section=>{section.querySelectorAll(".membership-highlights__image img").forEach(img=>{img.style.animationDuration="2s"});const blocks=section.querySelectorAll(".membership-highlights__block"),imageGroups=section.querySelectorAll(".membership-highlights__images-left, .membership-highlights__images-right");if(!blocks.length)return;section.membershipHighlightsInterval&&clearInterval(section.membershipHighlightsInterval);let activeIndex=0,userPaused=!1,hovered=!1;const setActiveBlock=index=>{blocks.forEach(block=>{const isActive=block.getAttribute("data-block-index")===String(index);block.classList.toggle("is-active",isActive)}),imageGroups.forEach(group=>{const isActive=group.getAttribute("data-block-index")===String(index);group.classList.toggle("is-active",isActive),group.toggleAttribute("hidden",!isActive)})},stop=()=>{clearInterval(section.membershipHighlightsInterval),section.membershipHighlightsInterval=null},start=()=>{section.membershipHighlightsInterval||userPaused||(section.membershipHighlightsInterval=setInterval(()=>{activeIndex=(activeIndex+1)%blocks.length,setActiveBlock(activeIndex)},3e3))},strings=window.theme&&window.theme.strings||{}
1,toggle=document.createElement("button");toggle.type="button",toggle.className="motion-toggle";const syncToggle=()=>{toggle.setAttribute("aria-pressed",userPaused?"true":"false"),toggle.setAttribute("aria-label",userPaused?strings.ticker_play||"Play automatic rotation":strings.ticker_pause||"Pause automatic rotation")};toggle.innerHTML='<svg class="motion-toggle__pause" viewBox="0 0 12 12" aria-hidden="true" focusable="false"><rect x="1" y="1" width="3.5" height="10" rx="0.5"/><rect x="7.5" y="1" width="3.5" height="10" rx="0.5"/></svg><svg class="motion-toggle__play" viewBox="0 0 12 12" aria-hidden="true" focusable="false"><path d="M2 1.2v9.6a.5.5 0 0 0 .77.42l7.2-4.8a.5.5 0 0 0 0-.84l-7.2-4.8A.5.5 0 0 0 2 1.2Z"/></svg>',toggle.addEventListener("click",()=>{userPaused=!userPaused,userPaused?stop():start(),syncToggle()});const container=section.querySelector(".membership-highlights");if(container&&!container.querySelector(".motion-toggle")&&(syncToggle(),container.appendChild(toggle)),section.addEventListener("mouseenter",()=>{hovered=!0,stop()}),section.addEventListener("mouseleave",()=>{hovered=!1,start()}),section.addEventListener("focusin",stop),section.addEventListener("focusout",()=>{hovered||start()}),window.matchMedia("(prefers-reduced-motion: reduce)").matches){userPaused=!0,syncToggle(),setActiveBlock(0);return}start()})};document.addEventListener("DOMContentLoaded",membershipHighlights),document.addEventListener("shopify:section:load",membershipHighlights),(function(){const CSS_OVERRIDES=`
2    .rc-selection__root * {
3      color: var(--text) !important;
4    }
5    .rc-purchase-option[rc-selected] {
6      border-color: var(--text) !important;
7    }
8    #rc-subscription-badge,
9    #rc-subscription-badge * {
10    color: #FFF !important;
11    }
12    .strike-through {
13    opacity: .5;
14    display: none;}
15    
16    .rc-purchase-option {
17    border-width: 3px !important;
18    }
19  `,VAR_OVERRIDES={"--rc-widget-brand-color":"var(--text)","--rc-widget-brand-color-10":"color-mix(in srgb, var(--text) 10%, #ffffff)","--rc-widget-brand-color-20":"color-mix(in srgb, var(--text) 20%, #ffffff)","--rc-widget-brand-color-50":"color-mix(in srgb, var(--text) 50%, #ffffff)","--rc-widget-brand-color-70":"color-mix(in srgb, var(--text) 70%, #ffffff)","--rc-widget-brand-color-80":"color-mix(in srgb, var(--text) 80%, #ffffff)","--rc-widget-brand-contrast-color":"#FFFFFF","--rc-widget-text-color":"var(--text)","--rc-widget-selected-bg-color":"#FFFFFF","--rc-widget-selected-text-color":"var(--text)","--rc-widget-badge-text-color":"var(--text)","--rc-widget-badge-bg-color":"var(--text)","--rc-widget-card-radius":"16px","--rc-widget-button-radius":"8px","--rc-widget-badge-radius":"16px","--rc-widget-field-radius":"8px"};function findShadowHost(){const hosts=document.querySelectorAll("*");for(const el of hosts)if(el.shadowRoot&&el.shadowRoot.querySelector(".rc-selection__root"))return el;return null}function applyEverything(){const host=findShadowHost();if(!host)return!1;const root=host.shadowRoot,target=root.querySelector(".rc-selection__root");
19if(!root.querySelector("style[data-custom-override]")){const style=document.createElement("style");style.setAttribute("data-custom-override","true"),style.textContent=CSS_OVERRIDES,root.appendChild(style)}for(const[prop,value]of Object.entries(VAR_OVERRIDES))target.style.setProperty(prop,value,"important");return!0}applyEverything(),new MutationObserver(()=>{applyEverything()}).observe(document.body,{childList:!0,subtree:!0})})(),(function(){const HIDE_PATTERNS=[/\b1\s*pack\b/i,/\b3\s*pack\b/i];let hideWidget=!1;const variantShouldHide=variant=>variant?[variant.title].concat(variant.options||[]).filter(Boolean).some(name=>HIDE_PATTERNS.some(re=>re.test(name))):!1,findWidgetHost=()=>{for(const el of document.querySelectorAll("*"))if(el.shadowRoot&&el.shadowRoot.querySelector(".rc-selection__root"))return el;return null},forceOneTimePurchase=root=>{const radios=root.querySelectorAll('input[type="radio"]');for(const radio of radios){const value=(radio.value||"").toLowerCase(),label=(radio.closest("label")||radio.closest(".rc-purchase-option")||radio).textContent.toLowerCase();if(value==="onetime"||value==="one_time"||value===""||/one[\s-]?time/.test(label)){radio.checked||radio.click();break}}document.querySelectorAll('form[action*="/cart/add"] [name="selling_plan"]').forEach(input=>{input.value!==""&&(input.value="",input.dispatchEvent(new Event("change",{bubbles:!0})))})},syncWidgetVisibility=()=>{const host=findWidgetHost();host&&(hideWidget?(forceOneTimePurchase(host.shadowRoot),host.style.setProperty("display","none","important")):host.style.removeProperty("display"))};document.addEventListener("theme:variant:change",e=>{hideWidget=variantShouldHide(e.detail&&e.detail.variant),syncWidgetVisibility()});const initialCheck=()=>{const jsonEl=document.querySelector("[data-product-json]"),idInput=document.querySelector('form[action*="/cart/add"] [name="id"]');if(!(!jsonEl||!idInput)){try{const variant=JSON.parse(jsonEl.innerHTML).variants.find(v=>String(v.id)===String(idInput.value));hideWidget=variantShouldHide(variant)}catch{return}syncWidgetVisibility()}};initialCheck(),document.addEventListener("shopify:section:load",initialCheck),new MutationObserver(syncWidgetVisibility).observe(document.body,{childList:!0,subtree:!0})})()})();
20//# sourceMappingURL=/cdn/shop/t/9/assets/custom.js.map?v=11410623700546696561791208789

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