usePolarisStarterPackBulkFollow",["CometRelay","FBLogger","Promise","asyncToGeneratorRuntime","isEmpty","react","relay-runtime","usePolarisStarterPackBulkFollowMutation.graphql","usePolarisStarterPackBulkFollowQuery.graphql"],(function(a,b,c,d,e,f,g){"use strict";var h,i,j,k,l,m=(l||d("react")).useCallback,n=h!==void 0?h:h=b("usePolarisStarterPackBulkFollowQuery.graphql"),o=i!==void 0?i:i=b("usePolarisStarterPackBulkFollowMutation.graphql");function a(a){var e=d("CometRelay").useRelayEnvironment(),f=d("CometRelay").useMutation(o),g=f[0];f=f[1];var h=m(b("asyncToGeneratorRuntime").asyncToGenerator(function*(){if(a==null)return;c("FBLogger")("ig_web").info("Starting bulk follow for starter pack: %s",a);try{var f,h=(yield d("relay-runtime").fetchQuery(e,n,{id:a}).toPromise());h=(h=h==null||(f=h.fetch__XIGStarterPack)==null?void 0:f.creators)!=null?h:[];if(h.length===0){c("FBLogger")("ig_web").info("No creators found in starter pack: %s",a);return}c("FBLogger")("ig_web").info("Following %d creators from starter pack: %s",h.length,a);var i=h.filter(function(a){return!(k||(k=c("isEmpty")))(a==null?void 0:a.pk)});i.length!==h.length&&c("FBLogger")("ig_web").warn("Found %d invalid creators in starter pack: %s",h.length-i.length,a);if((k||(k=c("isEmpty")))(i)){c("FBLogger")("ig_web").warn("No valid creators to follow in starter pack: %s",a);return}var l=i.map(function(a){return a.pk}).filter(function(a){return a!=null});yield new(j||(j=b("Promise")))(function(b,d){g({onCompleted:function(d){d=(d=d.xdt_starter_pack_follow)!=null?d:[];c("FBLogger")("ig_web").info("Successfully bulk followed %d creators from starter pack: %s",d.length,a);b()},onError:function(b){c("FBLogger")("ig_web").warn("Failed to bulk follow creators from starter pack: %s - %s",a,b.message),d(b)},variables:{input:{starter_pack_id:a,user_ids:l}}})});c("FBLogger")("ig_web").info("Completed bulk follow for starter pack: %s",a)}catch(b){c("FBLogger")("ig_web").warn("Failed to fetch starter pack data: %s - %s",a,b!=null&&typeof b==="object"&&"message"in b?String(b.message):String(b))}}),[a,g,e]);return{bulkFollowCreators:h,isBulkFollowing:f}}g["default"]=a}),98);
-----
usePolarisStarterPackBulkFollowQuery.graphql",["usePolarisStarterPackBulkFollowQuery_instagramRelayOperation"],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"id"}],c=[{kind:"Variable",name:"id",variableName:"id"}],d={alias:null,args:null,kind:"ScalarField",name:"pk",storageKey:null},e={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"usePolarisStarterPackBulkFollowQuery",selections:[{alias:null,args:c,concreteType:"XIGStarterPack",kind:"LinkedField",name:"fetch__XIGStarterPack",plural:!1,selections:[{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"creators",plural:!0,selections:[d],storageKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"usePolarisStarterPackBulkFollowQuery",selections:[{alias:null,args:c,concreteType:"XIGStarterPack",kind:"LinkedField",name:"fetch__XIGStarterPack",plural:!1,selections:[{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"creators",plural:!0,selections:[d,e],storageKey:null},e],storageKey:null}]},params:{id:b("usePolarisStarterPackBulkFollowQuery_instagramRelayOperation"),metadata:{},name:"usePolarisStarterPackBulkFollowQuery",operationKind:"query",text:null}}}();e.exports=a}),null);
-----
usePolarisStarterPackBulkFollowQuery_instagramRelayOperation",[],(function(a,b,c,d,e,f){e.exports="24296604236691881"}),null);
-----