import{c as a}from"./a-14d94dc6.js";import{i as m}from"./is-plan-event-enabled-a83d33b8.js";import"./index-0d8158eb.js";import"./layout-9e52ad07.js";import"./use-notification-56391e62.js";import"./index-aba65090.js";import"./error-messages-d2d0bb30.js";import"./index.esm-07f1e6d3.js";import"./index-845e4de2.js";import"./index-c0b93546.js";import"./index-9af9f9f3.js";function c(r,u){var n,i;if(!r||!Object.keys(r))return{};var o=r.integrations?Object.keys(r.integrations).filter(function(e){return r.integrations[e]===!1}):[],s=[];return((n=u.remotePlugins)!==null&&n!==void 0?n:[]).forEach(function(e){o.forEach(function(t){(e.name.includes(t)||t.includes(e.name))&&s.push(e.name)})}),((i=u.remotePlugins)!==null&&i!==void 0?i:[]).reduce(function(e,t){return t.settings.subscriptions&&s.includes(t.name)&&t.settings.subscriptions.forEach(function(f){return e["".concat(t.name," ").concat(f.partnerAction)]=!1}),e},{})}function A(r,u){function n(i){var o=r,s=i.event.event;if(o&&s){var e=o[s];if(m(o,e)){var t=c(e,u);i.updateEvent("integrations",a(a(a({},i.event.integrations),e==null?void 0:e.integrations),t))}else return i.updateEvent("integrations",a(a({},i.event.integrations),{All:!1,"Segment.io":!0})),i}return i}return{name:"Schema Filter",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:n,alias:n,track:n,identify:n,group:n}}export{A as schemaFilter};
