DeveloperInstantGamesContentRatingFields.react",["fbt","ix","BizMsgPlatformCountrySelector.react","DeveloperInstantGamesComplianceUtils.react","DeveloperInstantGamesContentRatingCertSubmissionStatusModal.react","DeveloperInstantGamesContentRatingFields_IarcCertRequestMutation.graphql","DeveloperInstantGamesContentRatingFields_IarcInfoMutation.graphql","DeveloperInstantGamesContentRatingFields_Query.graphql","DeveloperInstantGamesContentRatingTableRelayWrapper","DeveloperInstantGamesContentRatingUseExistingCertModal.react","DeveloperInstantGamesIAPHelper","GeoButton.react","GeoCard.react","GeoDropdownMenu.react","GeoFlexbox.react","GeoHeading.react","GeoLink.react","GeoMenuItem.react","GeoSection.react","GeoStatusIcon.react","GeoText.react","GeoTextInput.react","GeoTooltip.react","ISOCountryCode","Image.react","RelayHooks","geoMargin","isEmail","nullthrows","react"],(function(a,b,c,d,e,f,g,h,i){"use strict";var j,k,l,m,n=m||(m=d("react")),o=m.useState,p=j!==void 0?j:j=b("DeveloperInstantGamesContentRatingFields_Query.graphql"),q=k!==void 0?k:k=b("DeveloperInstantGamesContentRatingFields_IarcCertRequestMutation.graphql"),r=l!==void 0?l:l=b("DeveloperInstantGamesContentRatingFields_IarcInfoMutation.graphql"),s={width100:{width:"xh8yej3",$$css:!0}},t={NOT_ADMIN:"not_admin",NO_BUSINESS_ATTACHED:"no_business_attached"};function a(a){var b=a.appId,e=a.countryOfOrigin,g=a.iarcEmail,j=a.isIARCComplianceComplete,k=a.permissionEnum;a=d("RelayHooks").useLazyLoadQuery(p,{app_id:b},{fetchPolicy:"store-and-network"});var l=(a=a.node)==null?void 0:(a=a.game_app_with_age_compliance)==null?void 0:a.iarc_cert;a=o(e);var m=a[0],u=a[1];a=o(g);var v=a[0];a=a[1];var w=d("RelayHooks").useMutation(q),x=w[0],y=w[1];w=o(!1);var z=w[0],A=w[1];w=o(null);var B=w[0],C=w[1];j=o((w=j)!=null?w:!1);w=j[0];var D=j[1];j=d("RelayHooks").useMutation(r);var E=j[0];j=j[1];var F=o(null),G=F[0],H=F[1];F=o(null);var I=F[0],J=F[1],K=G!==!0&&e==null&&g==="";function L(a){var c=window.open("","_blank");x({variables:{input:{app_id:b}},onCompleted:function(b){b=(b=b.xfb_create_iarc_cert_request_uri)==null?void 0:b.iarc_request_uri;b!=null?(c.location=b,a(!0)):c.close()}})}function M(){if(!c("isEmail")(v)){H(!1);J(h._(/*BTDS*/"Please submit a valid email").toString());return}E({variables:{input:{app_id:b,iarc_email:v,country_of_origin_code:c("nullthrows")(m)}},onCompleted:function(a){var b;b=(b=(b=a.xfb_submit_iarc_info)==null?void 0:b.success)!=null?b:!1;a=(a=a.xfb_submit_iarc_info)==null?void 0:(a=a.error)==null?void 0:a.message;if(b){H(!0);return}H(!1);J(a)}})}function N(){if(y)return;if(k.result_code===t.NOT_ADMIN)return h._(/*BTDS*/"Only admins of this app can change this certificate.");if(k.result_code===t.NO_BUSINESS_ATTACHED)return h._(/*BTDS*/"A business must be attached to this app to change this certificate.");return!c("isEmail")(v)||m==null||K?h._(/*BTDS*/"Please submit a contact email and country of origin (to be shared with IARC) before adding a certificate"):null}function O(){switch(k.result_code){case t.NOT_ADMIN:return h._(/*BTDS*/"Only admins of this app can change this field.");case t.NO_BUSINESS_ATTACHED:return h._(/*BTDS*/"A business must be attached to this app to change this field.")}}function P(a){if(G===!1)return I;if(a&&!c("isEmail")(v))return h._(/*BTDS*/"Please include a contact email (to be shared with IARC) before adding a certificate.");else if(!a&&m==null)return h._(/*BTDS*/"Please include a country of origin (to be shared with IARC) before adding a certificate.");return null}F=d("DeveloperInstantGamesIAPHelper").useGeoImperativeModal(function(a){var b=a.isShown;a=a.onHide;return n.jsx(c("DeveloperInstantGamesContentRatingCertSubmissionStatusModal.react"),{isShown:b,isSuccess:z,onHide:a,submissionErrorMessage:B})});var Q=F.showModal;e=F.modal;g=d("DeveloperInstantGamesIAPHelper").useGeoImperativeModal(function(a){var d=a.isShown;a=a.onHide;return n.jsx(c("DeveloperInstantGamesContentRatingUseExistingCertModal.react"),{appId:b,iarcEmail:v,isShown:d,onHide:a,setIsSubmissionSuccess:A,setSubmissionErrorMessage:C,showSubmissionResponseModal:Q})});var R=g.showModal;F=g.modal;function S(){var a=N();return n.jsxs(c("GeoDropdownMenu.react"),{disabledMessage:a,isDisabled:a!=null||y||K,isLoading:y,label:l==null?h._(/*BTDS*/"Add Certificate"):h._(/*BTDS*/"Replace Certificate"),children:[n.jsx(c("GeoMenuItem.react"),{label:h._(/*BTDS*/"Request New"),onClick:function(){return L(function(){return D(!0)})}}),n.jsx(c("GeoMenuItem.react"),{label:h._(/*BTDS*/"Use Existing"),onClick:function(){R()}})]})}S.displayName=S.name+" [from "+f.id+"]";return n.jsxs(c("GeoCard.react"),{children:[n.jsx(c("GeoSection.react"),{children:n.jsxs(c("GeoFlexbox.react"),{direction:"row",justifyContent:"space-between",xstyle:c("geoMargin").all0,children:[n.jsx(c("GeoHeading.react"),{level:4,children:h._(/*BTDS*/"Age Rating Verification")}),n.jsxs(c("GeoFlexbox.react"),{alignItems:"center",children:[n.jsx(c("GeoText.react"),{children:d("DeveloperInstantGamesComplianceUtils.react").getComplianceStatusIndicatorText(w)}),n.jsx(c("GeoStatusIcon.react"),{status:w?"success":"warning",xstyle:c("geoMargin").start8})]})]})}),n.jsx(c("GeoSection.react"),{children:n.jsxs(c("GeoFlexbox.react"),{alignItems:"end",direction:"column",justifyContent:"start",rowGap:8,children:[n.jsx(c("GeoTextInput.react"),{disabledMessage:O(),errorMessage:P(!0),isDisabled:!k.isAllowed,label:h._(/*BTDS*/"Developer Contact Email (shared with IARC)"),onChange:a,tooltip:n.jsx(c("GeoTooltip.react"),{content:h._(/*BTDS*/"IARC and rating authorities require a developer contact email address. This may be used to contact you with follow-up questions or to provide additonal information about publishing in their jurisdictions.")}),value:v}),n.jsx(c("BizMsgPlatformCountrySelector.react"),{countryCode:m,"data-testid":void 0,disabledMessage:O(),errorMessage:P(!1),isDisabled:!k.isAllowed,isMultiSelect:!1,label:h._(/*BTDS*/"Developer Country of Origin (shared with IARC)"),onChange:function(a){return u(c("ISOCountryCode")[a])},tooltip:n.jsx(c("GeoTooltip.react"),{content:h._(/*BTDS*/"Country of origin is derived from the address that the developer provides for its legal contact. The country details will be provided to rating agencies, who may have additional requirements based on this information.")})}),n.jsxs(c("GeoFlexbox.react"),{alignItems:"center",direction:"row",justifyContent:"space-between",xstyle:s.width100,children:[n.jsx(c("GeoText.react"),{children:h._(/*BTDS*/"For more information about how IARC handles your data, please review the IARC {=m2} and {=m6}.",[h._implicitParam("=m2",n.jsx(c("GeoLink.react"),{href:"https://web.iarcservices.com/External/PrivacyPolicy",children:h._(/*BTDS*/"privacy policy")})),h._implicitParam("=m6",n.jsx(c("GeoLink.react"),{href:"https://web.iarcservices.com/terms",children:h._(/*BTDS*/"terms of service")}))])}),n.jsx(c("GeoButton.react"),{disabledMessage:O(),isDisabled:!k.isAllowed||j||m===null||v==="",isLoading:j,label:h._(/*BTDS*/"Save"),onClick:function(){M()},variant:"primary",xstyle:c("geoMargin").top8})]}),G===!0&&j!==!0&&n.jsx(c("GeoText.react"),{children:h._(/*BTDS*/"Success")})]})}),n.jsxs(c("GeoSection.react"),{children:[l==null?n.jsxs(c("GeoFlexbox.react"),{alignItems:"center",direction:"column",xstyle:c("geoMargin").vert24,children:[n.jsx(c("Image.react"),{src:i("1532023")}),n.jsx(c("GeoHeading.react"),{level:3,xstyle:c("geoMargin").vert16,children:h._(/*BTDS*/"No IARC Certificate Found")}),n.jsx(c("GeoText.react"),{xstyle:[c("geoMargin").vert8,c("geoMargin").horiz16],children:h._(/*BTDS*/"If your app already has an IARC Certificate obtained at another storefront, you must enter that Certificate ID here. Click "Add Certificate", then "Use Existing".")}),S(),F]}):n.jsxs(n.Fragment,{children:[n.jsxs(c("GeoFlexbox.react"),{alignItems:"start",justifyContent:"space-between",xstyle:c("geoMargin").vert24,children:[n.jsxs("div",{children:[n.jsx(c("GeoHeading.react"),{level:4,children:h._(/*BTDS*/"IARC Certificate ID")}),n.jsx(c("GeoFlexbox.react"),{alignItems:"center",children:n.jsx(c("GeoText.react"),{children:h._(/*BTDS*/"{do-not-translate}",[h._param("do-not-translate",n.jsx("code",{children:l==null?void 0:l.external_id}))])})})]}),S(),F]}),n.jsx(d("DeveloperInstantGamesContentRatingTableRelayWrapper").DeveloperInstantGamesContentRatingTableRelayWrapper,{iarcRatingList:l})]}),e]})]})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
DeveloperInstantGamesContentRatingUseExistingCertModal.react",["fbt","DeveloperInstantGamesContentRatingTableRelayWrapper","DeveloperInstantGamesContentRatingUseExistingCertModalMutation.graphql","DeveloperInstantGamesContentRatingUseExistingCertModal_IarcCertSubmissionMutation.graphql","GeoButton.react","GeoCancelButton.react","GeoFlexbox.react","GeoHeading.react","GeoModal.react","GeoModalFooter.react","GeoModalHeader.react","GeoSection.react","GeoText.react","GeoTextInput.react","RelayHooks","geoMargin","react","submitFormValidationHook"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j,k,l=k||(k=d("react"));e=k;var m=e.useCallback,n=e.useState,o=new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","i"),p=i!==void 0?i:i=b("DeveloperInstantGamesContentRatingUseExistingCertModalMutation.graphql"),q=j!==void 0?j:j=b("DeveloperInstantGamesContentRatingUseExistingCertModal_IarcCertSubmissionMutation.graphql");function r(a){var b=a.certFetched,e=a.handleCertSubmission,f=a.isFetchingCert,g=a.isSubmissionMutationInFlight,i=a.updateIARCCert;a=d("submitFormValidationHook").useFormSubmitValidation();var j=a[0];a=b?l.jsx(c("GeoButton.react"),{isDisabled:g,isLoading:g,label:h._(/*BTDS*/"Submit"),onClick:function(){e()},variant:"primary"}):l.jsx(c("GeoButton.react"),{isDisabled:f,isLoading:f,label:h._(/*BTDS*/"Search"),onClick:function(){if(!j())return;i()},variant:"primary"});return l.jsx(c("GeoModalFooter.react"),{primaryButton:a,secondaryButton:l.jsx(c("GeoCancelButton.react"),{})})}r.displayName=r.name+" [from "+f.id+"]";function s(a){var b=a.appId,e=a.iarcEmail,f=a.isShown,g=a.onHide,i=a.setIsSubmissionSuccess,j=a.setSubmissionErrorMessage,k=a.showSubmissionResponseModal;a=n("");var s=a[0],t=a[1];a=n(null);var u=a[0],v=a[1];a=n(null);var w=a[0],x=a[1];a=n(null);var y=a[0],z=a[1];a=n(null);var A=a[0],B=a[1];a=n(!1);var C=a[0],D=a[1];a=d("submitFormValidationHook").useInputValidation(m(function(){return!L(s)},[s]));a=a.showErrorState;var E=d("RelayHooks").useMutation(p),F=E[0];E=E[1];var G=d("RelayHooks").useMutation(q),H=G[0];G=G[1];function I(){if(L(s))return;var a={externalID:s,appID:b};F({variables:a,onCompleted:function(a){var b,c,d;b=a==null?void 0:(b=a.xfb_fetch_iarc_cert)==null?void 0:b.iarc_cert;c=a==null?void 0:(c=a.xfb_fetch_iarc_cert)==null?void 0:c.error;d=a==null?void 0:(d=a.xfb_fetch_iarc_cert)==null?void 0:d.date_created;a=a==null?void 0:(a=a.xfb_fetch_iarc_cert)==null?void 0:a.product_name;c?v(c):b!==null&&(x(b),B(a),z(d),D(!0))}})}function J(){var a;H({variables:{input:{iarc_email:e,app_id:b,iarc_cert_id:(a=w==null?void 0:w.external_id)!=null?a:""}},onCompleted:function(a){var b;b=(b=(b=a.xfb_submit_iarc_cert)==null?void 0:b.success)!=null?b:!1;a=(a=a.xfb_submit_iarc_cert)==null?void 0:(a=a.error)==null?void 0:a.message;if(b){window.location.reload();return}j(a);i(b);g();k()}})}function K(){if(u)return u.message}function L(a){return!o.test(a)?h._(/*BTDS*/"Please enter your certificate ID in this format: 12345678-1234-1234-1234-123456789ABC"):null}return l.jsx(c("GeoModal.react"),{footer:l.jsx(r,{certFetched:w!=null,handleCertSubmission:J,isFetchingCert:E,isSubmissionMutationInFlight:G,updateIARCCert:I}),header:l.jsx(c("GeoModalHeader.react"),{heading:h._(/*BTDS*/"Use Existing Certificate")}),isShown:f,onHide:g,children:l.jsx(c("GeoSection.react"),{children:C?l.jsxs(l.Fragment,{children:[l.jsx(c("GeoFlexbox.react"),{alignItems:"start",justifyContent:"space-between",xstyle:c("geoMargin").vert24,children:l.jsxs("div",{children:[l.jsx(c("GeoHeading.react"),{level:4,children:h._(/*BTDS*/"IARC Certificate ID")}),l.jsx(c("GeoFlexbox.react"),{alignItems:"center",children:l.jsx(c("GeoText.react"),{children:h._(/*BTDS*/"{do-not-translate}",[h._param("do-not-translate",l.jsx("code",{children:w==null?void 0:w.external_id}))])})}),l.jsx(c("GeoHeading.react"),{level:4,children:h._(/*BTDS*/"Product Name")}),l.jsx(c("GeoFlexbox.react"),{alignItems:"center",children:l.jsx(c("GeoText.react"),{children:h._(/*BTDS*/"{do-not-translate}",[h._param("do-not-translate",l.jsx("code",{children:A}))])})}),l.jsx(c("GeoHeading.react"),{level:4,children:h._(/*BTDS*/"Date Created")}),l.jsx(c("GeoFlexbox.react"),{alignItems:"center",children:l.jsx(c("GeoText.react"),{children:h._(/*BTDS*/"{do-not-translate}",[h._param("do-not-translate",l.jsx("code",{children:y}))])})})]})}),l.jsx(d("DeveloperInstantGamesContentRatingTableRelayWrapper").DeveloperInstantGamesContentRatingTableRelayWrapper,{iarcRatingList:w})]}):l.jsx(c("GeoTextInput.react"),{errorMessage:a||u?L(s)||K():void 0,label:h._(/*BTDS*/"Certificate ID"),onChange:function(a){t(a.toUpperCase()),v(null)},value:s})})})}s.displayName=s.name+" [from "+f.id+"]";function a(a){return l.jsx(d("submitFormValidationHook").FormValidationContextProvider,{children:l.jsx(s,babelHelpers["extends"]({},a))})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
DeveloperInstantGamesContentRatingUseExistingCertModalMutation_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="24150751967863365"}),null);
-----
DeveloperInstantGamesContentRatingUseExistingCertModal_IarcCertSubmissionMutation.graphql",["DeveloperInstantGamesContentRatingUseExistingCertModal_IarcCertSubmissionMutation_facebookRelayOperation"],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"input"}],c=[{alias:null,args:[{kind:"Variable",name:"data",variableName:"input"}],concreteType:"XFBSubmitIARCCertResponse",kind:"LinkedField",name:"xfb_submit_iarc_cert",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"success",storageKey:null},{alias:null,args:null,concreteType:"XFBInstantGameIARCCertErrors",kind:"LinkedField",name:"error",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"message",storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"DeveloperInstantGamesContentRatingUseExistingCertModal_IarcCertSubmissionMutation",selections:c,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"DeveloperInstantGamesContentRatingUseExistingCertModal_IarcCertSubmissionMutation",selections:c},params:{id:b("DeveloperInstantGamesContentRatingUseExistingCertModal_IarcCertSubmissionMutation_facebookRelayOperation"),metadata:{},name:"DeveloperInstantGamesContentRatingUseExistingCertModal_IarcCertSubmissionMutation",operationKind:"mutation",text:null}}}();e.exports=a}),null);
-----