DeveloperPlatformARAFQuestionContextProvider",["DeveloperConsolidatedAssessmentQuestionContext","DeveloperConsolidatedAssessmentQuestionDataReducer","DeveloperPlatformARAFContext","DeveloperPlatformARAFQuestionContextProviderQuery.graphql","RelayHooks","convertARAFPageToQuestionModuleType","react","shallowMapEqual","useBoolean","useGetInitialFormData"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u=s||(s=o("react")),c=s,d=c.useMemo,m=c.useReducer,p=c.useState,_=e!==void 0?e:e=n("DeveloperPlatformARAFQuestionContextProviderQuery.graphql");function f(e){var t,n,a,i=e.appID,l=e.children,s=o("DeveloperPlatformARAFContext").useDeveloperPlatformARAFContext(),c=s.page,f=p({fetchKey:0,fetchPolicy:"network-only"}),g=f[0],h=f[1],y=o("RelayHooks").useLazyLoadQuery(_,{appID:i,questionModule:r("convertARAFPageToQuestionModuleType")(c)},g),C=(t=y.fetch__Application)==null||(t=t.access_request_assessment_module.latest_submission)==null?void 0:t.form_data,b=(n=C==null?void 0:C.total_page_count)!=null?n:1,v=(a=C==null?void 0:C.questions)!=null?a:[],S=p(c),R=S[0],L=S[1],E=o("useGetInitialFormData").useGetInitialFormData(v),k=o("useGetInitialFormData").useGetInitialAnswerData(v),I=p(0),T=I[0],D=I[1],x=m(o("DeveloperConsolidatedAssessmentQuestionDataReducer").formDataReducer,E),$=x[0],P=x[1],N=m(o("DeveloperConsolidatedAssessmentQuestionDataReducer").answerDataReducer,k),M=N[0],w=N[1],A=p(b),F=A[0],O=A[1],B=p(new Set([])),W=B[0],q=B[1],U=r("useBoolean")(!1),V=U.value,H=U.set;c!==R&&(L(c),D(0),O(b),h({fetchKey:g.fetchKey+1,fetchPolicy:"network-only"}),r("shallowMapEqual")($,E)||(P({type:o("DeveloperConsolidatedAssessmentQuestionDataReducer").FormDataAction.SET_FORM_DATA,data:E}),w({type:o("DeveloperConsolidatedAssessmentQuestionDataReducer").AnswerDataAction.SET_ANSWER_DATA,value:k})));var G=d(function(){return{currentPageIndex:T,setCurrentPageIndex:D,formData:$,setFormData:function(t,n){P({type:o("DeveloperConsolidatedAssessmentQuestionDataReducer").FormDataAction.SET_QUESTION_DATA,questionIdentifier:t,value:n})},totalPageCount:F,setTotalPageCount:O,visibleQuestions:W,setVisibleQuestions:q,isValidationErrorShown:V,setValidationErrorShown:H,answerData:M,dispatchAnswerData:w}},[T,$,V,H,F,W,M,w]);return u.jsx(o("DeveloperConsolidatedAssessmentQuestionContext").DeveloperConsolidatedAssessmentQuestionContext.Provider,{value:G,children:l})}f.displayName=f.name+" [from "+i.id+"]",l.default=f}),98);
-----
DeveloperPlatformARAFQuestionContextProviderQuery.graphql",["DeveloperPlatformARAFQuestionContextProviderQuery_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"appID"},{defaultValue:null,kind:"LocalArgument",name:"questionModule"}],t=[{kind:"Variable",name:"id",variableName:"appID"}],r=[{kind:"Variable",name:"question_module",variableName:"questionModule"}],o={alias:null,args:null,kind:"ScalarField",name:"total_page_count",storageKey:null},a={alias:null,args:null,kind:"ScalarField",name:"question_identifier",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"question_type",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"is_optional",storageKey:null},s={kind:"InlineFragment",selections:[{alias:"agree_value",args:null,kind:"ScalarField",name:"live_answer",storageKey:null}],type:"XFBDeveloperPlatformAgreeQuestion",abstractKey:null},u={kind:"InlineFragment",selections:[{alias:"boolean_value",args:null,kind:"ScalarField",name:"live_answer",storageKey:null}],type:"XFBDeveloperPlatformBooleanQuestion",abstractKey:null},c={kind:"InlineFragment",selections:[{alias:"checkbox_values",args:null,kind:"ScalarField",name:"live_answer",storageKey:null}],type:"XFBDeveloperPlatformCheckboxQuestion",abstractKey:null},d={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},m={kind:"InlineFragment",selections:[{alias:"file_values",args:null,concreteType:"XFBApplicationDataPracticesFile",kind:"LinkedField",name:"live_answer",plural:!0,selections:[d,{alias:null,args:null,kind:"ScalarField",name:"uri",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"file_name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"file_size_bytes",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"update_time",storageKey:null}],storageKey:null}],type:"XFBDeveloperPlatformFileQuestion",abstractKey:null},p={kind:"InlineFragment",selections:[{alias:"radio_value",args:null,kind:"ScalarField",name:"live_answer",storageKey:null}],type:"XFBDeveloperPlatformRadioQuestion",abstractKey:null},_={kind:"InlineFragment",selections:[{alias:"text_value",args:null,kind:"ScalarField",name:"live_answer",storageKey:null}],type:"XFBDeveloperPlatformTextQuestion",abstractKey:null},f={kind:"InlineFragment",selections:[{alias:"timestamp_value",args:null,concreteType:"FBDateTime",kind:"LinkedField",name:"live_answer",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null}],storageKey:null}],type:"XFBDeveloperPlatformTimestampQuestion",abstractKey:null},g={kind:"InlineFragment",selections:[{alias:"service_provider_values",args:null,concreteType:"XFBTIAServiceProviderInfo",kind:"LinkedField",name:"live_answer",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"countries",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"type_of_services",storageKey:null}],storageKey:null}],type:"XFBDeveloperPlatformServiceProviderQuestion",abstractKey:null},h={kind:"InlineFragment",selections:[{alias:"searchable_selector_value",args:null,kind:"ScalarField",name:"live_answer",storageKey:null}],type:"XFBDeveloperPlatformSearchableSelectorQuestion",abstractKey:null};return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:{throwOnFieldError:!0},name:"DeveloperPlatformARAFQuestionContextProviderQuery",selections:[{alias:null,args:t,concreteType:"Application",kind:"LinkedField",name:"fetch__Application",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBApplicationAccessRequestAssessmentModule",kind:"LinkedField",name:"access_request_assessment_module",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBAccessRequestAssessmentSubmission",kind:"LinkedField",name:"latest_submission",plural:!1,selections:[{alias:null,args:r,concreteType:"XFBApplicationConsolidatedAssessmentFormData",kind:"LinkedField",name:"form_data",plural:!1,selections:[o,{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"questions",plural:!0,selections:[{kind:"InlineDataFragmentSpread",name:"useGetInitialFormData_question",selections:[a,i,l,s,u,c,m,p,_,f,g,h],args:null,argumentDefinitions:[]}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"DeveloperPlatformARAFQuestionContextProviderQuery",selections:[{alias:null,args:t,concreteType:"Application",kind:"LinkedField",name:"fetch__Application",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBApplicationAccessRequestAssessmentModule",kind:"LinkedField",name:"access_request_assessment_module",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBAccessRequestAssessmentSubmission",kind:"LinkedField",name:"latest_submission",plural:!1,selections:[{alias:null,args:r,concreteType:"XFBApplicationConsolidatedAssessmentFormData",kind:"LinkedField",name:"form_data",plural:!1,selections:[o,{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"questions",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isXFBDeveloperPlatformQuestion"},a,i,l,s,u,c,m,p,_,f,g,h],storageKey:null}],storageKey:null},d],storageKey:null},d],storageKey:null},d],storageKey:null}]},params:{id:n("DeveloperPlatformARAFQuestionContextProviderQuery_facebookRelayOperation"),metadata:{},name:"DeveloperPlatformARAFQuestionContextProviderQuery",operationKind:"query",text:null}}})();a.exports=e}),null);
-----
DeveloperPlatformARAFQuestionContextProviderQuery_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="9603602309732234"}),null);
-----