"use strict";(self.webpackChunk_klaviyo_onsite_modules=self.webpackChunk_klaviyo_onsite_modules||[]).push([[7542],{2822:function(e,n,o){var t=o(9899),r=(o(53),o(4050)),i=o(8650),a=o(6623);const s=`${r.bl.url}${r.bl.clientGroups}`,c=(e,n,o)=>{const{_kx:t}=n;return(0,i.W)((()=>(({companyId:e,groupIds:n,_kx:o})=>{const t=n.sort();return fetch(`${s}/?company_id=${e}${((e,n)=>`&filter=any(id,[${e.map((e=>`"${e}"`)).join(",")}]),equals(profile._kx,"${n}")`)(t,o)}`,{method:"GET",headers:{"Access-Control-Allow-Headers":"*","Content-Type":"application/json",revision:"2023-07-17.pre"}})})({companyId:e,_kx:t,groupIds:o})),5,1e3+1e3*Math.random(),[429]).then((e=>e.json()))},l=(e,n)=>{if(!e||!Array.isArray(e))throw new Error("Invalid Input");window.klaviyo.isIdentified().then((()=>{let{$exchange_id:o}=(0,a.zy)();o||({_kx:o}=(0,a.oQ)()),o&&0!==e.length?window.klaviyo.account().then((e=>e||window.__klKey)).then((n=>{if(n&&o)return c(n,{_kx:o},e);throw new Error})).then((e=>{const{data:o}=e;n&&n(o.map((e=>e.id)))})).catch((()=>{n&&n([])})):n([])}))};(()=>{(0,t.e)("getGroupMembership",l)})()}},function(e){e.O(0,[2462],(function(){return n=2822,e(e.s=n);var n}));e.O()}]);