DollyMetaSupportAssistantViewRootEntrypoint.entrypoint",["DollyMetaSupportAssistantViewRootPageDataQuery$Parameters","JSResourceForInteraction","buildDollyRoute.entrypoint"],(function(t,n,r,o,a,i,l){"use strict";var e=r("buildDollyRoute.entrypoint")(r("JSResourceForInteraction")("DollyMetaSupportAssistantViewRoot.react").__setRef("DollyMetaSupportAssistantViewRootEntrypoint.entrypoint"),function(e){var t,r=e.routeParams,o=e.routeProps,a=o.query==null||o.query==="";return{queries:{pageData:{parameters:n("DollyMetaSupportAssistantViewRootPageDataQuery$Parameters"),variables:{session_id:o.sessionID}}},extraProps:{page_title:o.pageTitle,session_id:o.sessionID,hasInitialQuery:!a,initial_query:(t=o.query)!=null?t:"",initial_context_id:o.contextID,skip_initial_query:a,request_id:o.requestID}}});l.default=e}),98);
-----
DollyMetaSupportAssistantViewRootPageDataQuery$Parameters",["DollyMetaSupportAssistantViewRootPageDataQuery_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e={kind:"PreloadableConcreteRequest",params:{id:n("DollyMetaSupportAssistantViewRootPageDataQuery_facebookRelayOperation"),metadata:{},name:"DollyMetaSupportAssistantViewRootPageDataQuery",operationKind:"query",text:null}};a.exports=e}),null);
-----
DollyMetaSupportAssistantViewRootPageDataQuery_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="25249543908001604"}),null);
-----
DollyMetaSupportAssistantViewRoot.react",["fbt","CometRelay","CometRouteURL","ConstUriUtils","DollyChatAgentConnectionStatusBanner.react","DollyChatAgentMessage.react","DollyChatDefaultBotMessage.react","DollyChatFeedbackMessage.react","DollyChatMIAWContext.react","DollyChatMessagesContext.react","DollyChatPrepopulatedMessages.react","DollyChatTextArea.react","DollyHelpDisplayUtils","DollyMSAActionPanelContext.react","DollyMSAHeader.react","DollyMSAHeaderIcon.react","DollyMSAHeaderNavButton.react","DollyMSAMIAWAPIWrapper","DollyMSAMobileAIInfoFlyout.react","DollyMSAScrollToBottomButton.react","DollyMSASessionName.react","DollyMSASideNavWrapper.react","DollyMSASupportIntakeFlowContext","DollyMetaSupportAssistantViewRootPageDataQuery.graphql","FBLogger","MCDSFlexbox.react","MCDSHorizontalStack.react","MCDSVerticalStack.react","ReQLScrollAnchored.react","dollyChatMessagesRenderer","isEmpty","mcdsMargin","mcdsWidth","react","stylex","useBoolean","useDollyMSAActionView","useDollyMSAArticleView","useDollyMSANux","useDollyMSASupportIntakeFlowContextValue","useDollyMSASupportIntakeView","useMCDSViewportMargin","useMetaSupportAssistantSideNavState","usePrevious"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j,k,l,m=l||(l=d("react"));e=l;var n=e.useCallback,o=e.useEffect,p=e.useMemo,q=e.useRef,r=e.useState,s={height:"x16ye13r",borderTopWidth:"x178xt8z",borderTopStyle:"x13fuv20",borderTopColor:"xw21qh3",overflowX:"x101abm8",$$css:!0},t={containerWrapper:function(a){return[s,{"--x-height":function(a){return typeof a==="number"?a+"px":a!=null?a:void 0}("calc(100dvh - "+a+"px)")}]},navWrapper:{width:"xh8yej3",height:"x5yr21d",display:"x78zum5",justifyContent:"xl56j7k",$$css:!0},pageContainer:{flex:"x12lumcd",justifyContent:"xl56j7k",height:"x5yr21d",marginLeft:"x1gh5o4n",marginRight:"x1rmmofs",marginInlineStart:null,marginInlineEnd:null,$$css:!0},mobilePageContainer:{width:"xh8yej3",justifyContent:"xl56j7k",height:"x5yr21d",marginLeft:"xj3b58b",marginRight:"x1yf7rl7",marginInlineStart:null,marginInlineEnd:null,$$css:!0},bodyContainer:{width:"xh8yej3",maxWidth:"x1u6cv55",flex:"x12lumcd",flexDirection:"xdt5ytf",alignSelf:"xamitd3",$$css:!0},mobileBodyContainer:{maxWidth:"x1u6cv55",flex:"x12lumcd",flexDirection:"xdt5ytf",$$css:!0},mobileBodySpacer:{height:"xuzvuw4",$$css:!0},scrollableArea:{flexGrow:"x1iyjqo2",flexBasis:"xdl72j9",overflowY:"x1odjw0f",display:"x78zum5",flexDirection:"xdt5ytf",width:"xh8yej3",$$css:!0},actionCardAnimation:{transition:"x2dd9hm",$$css:!0},actionCardShown:{maxWidth:"x65f84u",minWidth:"x18n5i07",width:"xh8yej3",opacity:"x1hc1fzr",$$css:!0},actionCardHidden:{width:"xnalus7",opacity:"xg01cxk",$$css:!0}},u=17;function a(a){var b,d=a.extraProps;a=a.queries;return m.jsx(c("DollyMSAMIAWAPIWrapper"),{initialContextID:d==null?void 0:d.initial_context_id,initialQuery:d==null?void 0:d.initial_query,initialRequestID:(b=d==null?void 0:d.request_id)!=null?b:"",initialSessionID:(b=d==null?void 0:d.session_id)!=null?b:"",children:m.jsx(v,{extraProps:d,queries:a})})}a.displayName=a.name+" [from "+f.id+"]";function v(a){var e,f,g,l=a.extraProps;a=a.queries;var s=c("useMCDSViewportMargin")(),v=l==null?void 0:l.session_id,w=c("useDollyMSANux")(function(){},!0,!0),x=w.nux;w=w.nuxShown;if(v==null)throw c("FBLogger")("dolly").mustfixThrow("Session ID cannot be null");var y=d("DollyChatMessagesContext.react").useDollyChatMessages(),z=y.messages,A=y.setSessionID;y=d("DollyChatMIAWContext.react").useDollyChatMIAWContext();var B=y.agentName;y=y.isAgentTyping;o(function(){A(v)},[A,v]);var C=d("CometRelay").usePreloadedQuery(i!==void 0?i:i=b("DollyMetaSupportAssistantViewRootPageDataQuery.graphql"),a.pageData);a=d("CometRouteURL").getWindowURL();var D=a!=null?d("ConstUriUtils").getUri(a):null;a=r(function(){var a;return(l==null||(a=l.initial_query)==null?void 0:a.trim())!==""?l==null?void 0:l.initial_query:void 0});a=a[0];var E=r(v);E=E[0];var aa=!(j||(j=c("isEmpty")))(a),F=n(function(){if(D!=null){var a;window.history.replaceState({},"",(a=(a=D.removeQueryParam("q"))==null?void 0:a.toString())!=null?a:"")}},[D]);o(function(){(D==null?void 0:D.getQueryParam("q"))!=null&&F()},[D,F]);var G=d("DollyHelpDisplayUtils").useIsMobile(),H=c("useMetaSupportAssistantSideNavState")(),I=H.setFalse,ba=H.setTrue,J=H.value,K=c("usePrevious")(v);o(function(){G&&J&&K!==v&&I()},[I,G,J,K,v]);H=c("useBoolean")(!1);var L=H.setFalse,M=H.setTrue,N=H.value;H=r(null);var O=H[0],ca=H[1];H=r(null);var P=H[0],da=H[1];H=r(null);var Q=H[0],ea=H[1];H=r(null);var R=H[0],fa=H[1];H=c("useDollyMSASupportIntakeFlowContextValue")(C);var S=c("useDollyMSAArticleView")(O),ga=S.modal,T=S.showModal;S=c("useDollyMSAActionView")(O,"META_SUPPORT_ASSISTANT");var U=S.closeModal,ha=S.modal,V=S.showModal;S=c("useDollyMSASupportIntakeView")(H);var W=S.closeModal,ia=S.modal,X=S.showModal,Y=n(function(a,b,c,d){ca(a),da(b),ea(c),fa(d),M()},[M]);o(function(){var a;if((C==null||(a=C.xfb_care_sc_session_data)==null||(a=a.session)==null?void 0:a.support_intake_flow_state)!=null){var b,c=C==null||(b=C.xfb_care_sc_session_data)==null||(b=b.responses)==null||(b=b.filter(function(a){var b;return(a==null||(b=a.response)==null?void 0:b.ready_to_escalate)===!0}).toSorted(function(a,b){return((b=b==null?void 0:b.event_time)!=null?b:0)-((b=a==null?void 0:a.event_time)!=null?b:0)}))==null||(b=b[0])==null?void 0:b.event_time;Y("",d("DollyMSAActionPanelContext.react").DollyMSAActionPanelViewType.ESCALATION,c,c==null?void 0:c.toString())}},[C==null||(e=C.xfb_care_sc_session_data)==null?void 0:e.responses,C==null||(f=C.xfb_care_sc_session_data)==null||(f=f.session)==null?void 0:f.support_intake_flow_state,Y]);o(function(){if(O==null)return;return P===d("DollyMSAActionPanelContext.react").DollyMSAActionPanelViewType.ARTICLE?T():P===d("DollyMSAActionPanelContext.react").DollyMSAActionPanelViewType.AUTOMATION?V():P===d("DollyMSAActionPanelContext.react").DollyMSAActionPanelViewType.ESCALATION?X():void 0},[O,T,V,P,X]);var Z=n(function(){N&&P===d("DollyMSAActionPanelContext.react").DollyMSAActionPanelViewType.ESCALATION&&W(),N&&P===d("DollyMSAActionPanelContext.react").DollyMSAActionPanelViewType.AUTOMATION&&U(),L()},[P,L,U,W,N]);S=p(function(){return{isOpen:N,close:Z,forceClose:L,showActionPanelView:Y,viewType:P,messageEventTime:Q,messageId:R}},[Q,R,P,Z,N,Y,L]);var $=q(null);g=((g=z[z.length-1])==null?void 0:g.type)==="agent";z=[m.jsxs("div",{className:{0:"xyamay9 xnm25rq xyfqnmn",1:"xw7yly9 xnm25rq xyfqnmn x1gan7if"}[!!G<<0],children:[m.jsx(c("DollyChatDefaultBotMessage.react"),{viewer:C},"intro"),l!=null&&l.hasInitialQuery?null:m.jsx(c("DollyChatPrepopulatedMessages.react"),{session:C},"default"),d("dollyChatMessagesRenderer").dollyChatMessagesRenderer(z),y&&!g&&m.jsx(c("DollyChatAgentMessage.react"),{displayName:B,messages:[],typingIndicatorPlaceholder:!0,unixtime:null}),m.jsx(c("DollyChatFeedbackMessage.react"),{}),G&&m.jsx(c("MCDSFlexbox.react"),{xstyle:t.mobileBodySpacer})]},"scrollableArea")];y=m.jsx(c("MCDSFlexbox.react"),{xstyle:G?t.mobileBodyContainer:t.bodyContainer,children:m.jsx(c("ReQLScrollAnchored.react"),{elements:z,hideScrollbar:!0,initialAnchor:"bottom",ref:$,shouldOverscrollBehaviourContain:!0,xstyle:t.scrollableArea})});return m.jsx(d("DollyMSAActionPanelContext.react").DollyMSAActionPanelProviderContext.Provider,{value:S,children:m.jsxs(c("DollyMSASupportIntakeFlowContext").Provider,{value:H,children:[m.jsx("div",babelHelpers["extends"]({},(k||(k=c("stylex"))).props(t.containerWrapper(G?s.top:s.top+u)),{children:m.jsx(c("MCDSHorizontalStack.react"),{gap:0,xstyle:t.navWrapper,children:m.jsxs("div",{className:"x78zum5 x1lz411i xh8yej3",children:[m.jsx(c("DollyMSASideNavWrapper.react"),{isOpen:J,newSession:aa?{name:a!=null?a:"New conversation",session_id:E}:null,selectedSessionId:v,sessions:C,onClose:I}),m.jsxs("div",{className:"xh8yej3",children:[m.jsx(c("DollyMSAHeader.react"),{centerContent:m.jsx(c("DollyMSAHeaderIcon.react"),{}),endContent:m.jsx(c("DollyMSAMobileAIInfoFlyout.react"),{}),heading:G?null:m.jsx(c("DollyMSASessionName.react"),{initialName:a,session:C}),navButton:!J&&m.jsx(c("DollyMSAHeaderNavButton.react"),{label:h._(/*BTDS*/"Open"),tooltipContent:h._(/*BTDS*/"Expand sidebar"),onClick:ba})}),m.jsxs(c("MCDSHorizontalStack.react"),{gap:0,xstyle:G?t.mobilePageContainer:t.pageContainer,children:[m.jsxs(c("MCDSVerticalStack.react"),{gap:0,xstyle:c("mcdsWidth").fullWidth,children:[y,m.jsx(c("DollyMSAScrollToBottomButton.react"),{scrollRef:$}),m.jsxs("div",{className:"x1u6cv55 x1tudf5h x1m2p0i2 xdt5ytf xamitd3 xh8yej3",children:[m.jsx(c("DollyChatAgentConnectionStatusBanner.react"),{session:C}),m.jsx(c("DollyChatTextArea.react"),{})]})]}),m.jsxs(c("MCDSFlexbox.react"),{gap:0,xstyle:[N&&c("mcdsMargin").start24,t.actionCardAnimation,N&&!G?t.actionCardShown:t.actionCardHidden],children:[N&&P===d("DollyMSAActionPanelContext.react").DollyMSAActionPanelViewType.ARTICLE?ga:null,N&&P===d("DollyMSAActionPanelContext.react").DollyMSAActionPanelViewType.AUTOMATION?ha:null,N&&P===d("DollyMSAActionPanelContext.react").DollyMSAActionPanelViewType.ESCALATION?ia:null]})]})]})]})})})),w&&x]})})}v.displayName=v.name+" [from "+f.id+"]";g["default"]=a}),226);
-----