PubXWizardDataProvider.react",["AdsGraphAPI","AsyncTypedRequest","Promise","PubXAPIFields","PubXAppStoreStatusConfig","PubXFunnelTrackingPixel","PubXPlacementGroupDataloader","PubXWizardDataProviderCreatePlacementMutation.graphql","PubXWizardDataProviderUpdatePlacementMutation.graphql","XBusinessPubXAppCreateController","XBusinessPubXCancelSetupForPlatformController","XPubXSearchMobileAppStoresAsyncController","XPubXUpdateAppWithDSOController","pubXLog","react","react-compiler-runtime","react-relay"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u,c,d=c||(c=o("react")),m=c,p=m.useCallback,_=m.useRef,f=e!==void 0?e:e=n("PubXWizardDataProviderCreatePlacementMutation.graphql"),g=s!==void 0?s:s=n("PubXWizardDataProviderUpdatePlacementMutation.graphql");function h(e){var t=o("react-compiler-runtime").c(6),n=e.businessID,r=e.children,a=e.propertyID,i=e.query,l;t[0]!==n||t[1]!==a?(l={businessID:n,propertyID:a},t[0]=n,t[1]=a,t[2]=l):l=t[2];var s=o("react-relay").useLazyLoadQuery(i,l);if(!s.business)return null;var u;return t[3]!==r||t[4]!==s?(u=r(s),t[3]=r,t[4]=s,t[5]=u):u=t[5],u}function y(){var e=C;return e}function C(e){return o("AdsGraphAPI").get(i.id).object("businessID",e.businessID).edge("ad_monetization_properties").post({name:e.name}).then(v).then(b)}function b(e){return e.id}function v(e){return["ANCreateTotalProperty","ANCreateFirstProperty"].forEach(function(t){return o("PubXFunnelTrackingPixel").track(t,{property_id:e})}),r("pubXLog")({event:"PROPERTY_CREATION.CREATE",propertyID:e}),e}function S(){var e=R;return e}function R(e){return new(r("AsyncTypedRequest"))(r("XBusinessPubXAppCreateController").getURIBuilder().setBool("always_create_new_app",!0).setFBID("property_id",e.propertyID).getURI()).promisePayload().then(L)}function L(e){return e.app_id}function E(){var e=k;return e}function k(e){return o("AdsGraphAPI").get(i.id).object("placementGroupID",e).get({fields:o("PubXAPIFields").PLACEMENT_GROUP_METADATA}).then(I)}function I(e){return o("PubXPlacementGroupDataloader").formatLoadedData(e)}function T(){var e=D;return e}function D(e){return o("AdsGraphAPI").get(i.id).object("application",e.appID).edge("ad_placement_groups").post({name:e.name,platform:e.platform}).then(x)}function x(e){return e.id}function $(){var e=o("react-compiler-runtime").c(3),t=o("react-relay").useMutation(f),r=t[0],a=_(0),i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=function(){return a.current=a.current+1},e[0]=i):i=e[0];var l=i,s=P,c;e[1]!==r?(c=function(t,o){return new(u||(u=n("Promise")))(function(e,n){var a,i="TMP"+l();r({variables:{input:{ad_placement_channel:o.placementChannel,app_id:(a=o.appID)!=null?a:"",description:o.description,name:o.name,group_id:o.groupID,pubx_display_format:o.displayFormat,pubx_platform:o.platform}},optimisticResponse:{xfb_create_placement_application_ad_placement:{client_mutation_id:i,application_ad_placement:{id:i,ad_placement_channel:o.placementChannel,app:{id:o.appID},description:o.description,name:o.name,group_id:o.groupID,pubx_platform:o.platform,pubx_display_format:o.displayFormat,is_disabled:!1}}},optimisticUpdater:function(n){return s(n,t)},updater:function(n){return s(n,t)},onCompleted:function(r,o){if(o)n(o);else{var t;e((t=r.xfb_create_placement_application_ad_placement)==null||(t=t.application_ad_placement)==null?void 0:t.id)}},onError:n})})},e[1]=r,e[2]=c):c=e[2];var d=c;return d}function P(e,t){var n,r=(n=e.getRootField("xfb_create_placement_application_ad_placement"))==null?void 0:n.getLinkedRecord("application_ad_placement");if(r){var o=e.get(t),a=o==null?void 0:o.getLinkedRecord("placements");if(a){var i=a.getLinkedRecords("nodes")||[],l=r.getDataID();if(i.find(function(e){return(e==null?void 0:e.getDataID())===l})==null){var s=[].concat(i,[r]);a.setLinkedRecords(s,"nodes")}}}}function N(){var e=o("react-compiler-runtime").c(2),t=o("react-relay").useMutation(g),r=t[0],a=M,i;e[0]!==r?(i=function(t,o){return new(u||(u=n("Promise")))(function(e,n){r({variables:{input:{ad_placement_channel:o.placementChannel,application_ad_placement_id:t,description:o.description,group_id:o.groupID,is_disabled:o.isDisabled,name:o.name,pubx_display_format:o.displayFormat,should_delete_group:o.shouldDeleteGroup}},optimisticUpdater:function(n){return a(n,t,o)},updater:function(n){return a(n,t,o)},onCompleted:function(r,o){if(o)n(o);else{var t;e((t=r.xfb_update_placement_application_ad_placement)==null||(t=t.application_ad_placement)==null?void 0:t.id)}},onError:n})})},e[0]=r,e[1]=i):i=e[1];var l=i;return l}function M(e,t,n){var r=e.get(t);r&&(n.name!=null&&r.setValue(n.name,"name"),n.description!=null&&r.setValue(n.description,"description"),n.isDisabled!=null&&r.setValue(n.isDisabled,"is_disabled"),n.displayFormat!=null&&r.setValue(n.displayFormat,"pubx_display_format"),n.platform!=null&&r.setValue(n.platform,"pubx_platform"),n.placementChannel!=null&&r.setValue(n.placementChannel,"ad_placement_channel"),n.groupID!=null&&r.setValue(n.groupID,"group_id"))}function w(){var e=A;return e}function A(e,t){var n=r("XPubXSearchMobileAppStoresAsyncController").getURIBuilder().setEnum("platform",t).setString("uri",e).setBool("extended_dso",!0).getURI();return new(r("AsyncTypedRequest"))(n).promisePayload().then(O).catch(F)}function F(e){throw r("pubXLog")({event:"TRUST_TIER.APP_DETAILS.DSO_FETCH_ERROR",custom:e.message}),e}function O(e){var t,n,r=e.result;return r!=null?{appID:(t=r.appID)!=null?t:"",iconUrl:r.icon,id:r.id,name:r.name,isGaming:(n=r.isGaming)!=null?n:!1,status:o("PubXAppStoreStatusConfig").status.LIVE}:null}function B(){var e=W;return e}function W(e,t,n,a){o("PubXFunnelTrackingPixel").track("ANTTSubmitAppDetails",{}),o("PubXFunnelTrackingPixel").track("ANTTUniqueSubmitAppDetails",{});var i=new(r("AsyncTypedRequest"))(r("XPubXUpdateAppWithDSOController").getURIBuilder().setFBID("app_id",e).getURI()).setMethod("POST").setData({app_name:t,app_platform:n,dso_id:a}).promisePayload().then(U).catch(q);return i}function q(e){throw r("pubXLog")({event:"TRUST_TIER.APP_DETAILS.ERROR",custom:e.message}),e}function U(e){return r("pubXLog")({event:"TRUST_TIER.APP_DETAILS.SUCCESS"}),e.bundle_id}function V(){var e=H;return e}function H(e,t){var n=new(r("AsyncTypedRequest"))(r("XBusinessPubXCancelSetupForPlatformController").getURIBuilder().setFBID("property_id",e).setEnum("platform",t).getURI()).setMethod("POST").promisePayload();return n}function G(){var e=z;return e}function z(e,t){var n=o("AdsGraphAPI").get(i.id).object("property",e).post({name:t});return n}l.PubXWizardDataProvider=h,l.usePubXCreatePropertyMutation=y,l.usePubXCreateApplicationMutation=S,l.usePubXGetAdSpace=E,l.usePubXCreateAdSpaceMutation=T,l.usePubXCreatePlacementMutation=$,l.usePubXUpdatePlacementMutation=N,l.usePubXSearchDSO=w,l.usePubXCreateBundle=B,l.usePubXCancelPlatform=V,l.usePubXUpdateProperty=G}),98);
-----
PubXWizardDataProviderUpdatePlacementMutation.graphql",[],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"input"}],t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},n=[{alias:null,args:[{kind:"Variable",name:"data",variableName:"input"}],concreteType:"XFBUpdatePlacementApplicationAdPlacementResponsePayload",kind:"LinkedField",name:"xfb_update_placement_application_ad_placement",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"client_mutation_id",storageKey:null},{alias:null,args:null,concreteType:"XFBApplicationAdPlacement",kind:"LinkedField",name:"application_ad_placement",plural:!1,selections:[t,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,concreteType:"Application",kind:"LinkedField",name:"app",plural:!1,selections:[t],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ad_placement_channel",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"group_id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"pubx_platform",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"pubx_display_format",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"is_disabled",storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"PubXWizardDataProviderUpdatePlacementMutation",selections:n,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"PubXWizardDataProviderUpdatePlacementMutation",selections:n},params:{id:"24543320098639948",metadata:{},name:"PubXWizardDataProviderUpdatePlacementMutation",operationKind:"mutation",text:null}}})();a.exports=e}),null);
-----