1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[91,2472],{30091:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>g});var l=t(95155),r=t(81552),i=t(37206),a=t(12115),d=t(51806),u=t(46682),s=t(61158),o=t(4141),c=t(79738);t(41319);let f=(0,i.default)(()=>Promise.all([t.e(9328),t.e(5064),t.e(1685),t.e(1262),t.e(5117)]).then(t.bind(t,25117)),{loadableGenerated:{webpack:()=>[25117]},ssr:!1}),p={0:f,1:f,2:(0,i.default)(()=>t.e(8513).then(t.bind(t,68513)),{loadableGenerated:{webpack:()=>[68513]},ssr:!1}),3:f,4:f,5:f,6:f,9:(0,i.default)(()=>Promise.all([t.e(5126),t.e(182)]).then(t.bind(t,60182)),{loadableGenerated:{webpack:()=>[60182]},ssr:!1}),10:f};function g({isOpen:e,dingSlug:n,seedDing:t,cityId:i,cityName:y,activeClusters:w=[],selectedProfile:h=null,selectedProfileImage:m=null,onSelectProfile:E,userProfiles:b=[],isLoadingUserProfiles:v=!1,userProfilesError:k=null,onClose:C,onInvalid:_,onReplyCreated:P}){let[I,L]=(0,a.useState)(()=>t?(0,s.FK)(t)??t:null),[N,S]=(0,a.useState)(!1),[T,x]=(0,a.useState)(null),A=(0,a.useRef)(0);(0,a.useEffect)(()=>{L(t?(0,s.FK)(t)??t:null),x(null)},[n,t]),(0,a.useEffect)(()=>{if(!e)return;let l=!0,a=new AbortController,d=++A.current,f=[],p=e=>{let n=e.detail;f?.push(n),L(e=>e?(0,r.Zh)(e,n):e)};return window.addEventListener(r.km,p),async function(){let e=(0,o.Bl)(t?.type_id??null);S(!0),x(null);try{let p=t?.id?await u.$.getDing(t.id,{signal:a.signal}):await u.$.getDingBySlug(n,{signal:a.signal});if(!l||d!==A.current||499===p.status)return;if(!p.success||!p.data){x(e.loadErrorInline),t||_?.(e.loadErrorToast);return}let g=p.data;if(!(0,o.N7)(g.type_id)){x(e.wrongTypeInline),_?.(e.wrongTypeToast);return}if(!(0,c.$y)(g.city_id,i)){let e=(0,o.Bl)(g.type_id);x(e.wrongCityInline),_?.(e.wrongCityToast);return}let y=(f??[]).reduce(r.Zh,g);L((0,s.FK)(y)??y)}catch(n){if(!l||d!==A.current)return;x(e.loadErrorInline)}finally{f=null,l&&d===A.current&&S(!1)}}(),()=>{l=!1,a.abort(),window.removeEventListener(r.km,p)}},[i,n,e,_,t]),(0,a.useEffect)(()=>{if(!e)return;let n=e=>{let n=e.detail;n&&"number"==typeof n.dingId&&L(e=>{let t=(0,s.l8)(e,n);return void 0===t?e:t??null})};return window.addEventListener(s.cY,n),()=>{window.removeEventListener(s.cY,n)}},[e]);let B=(0,a.useCallback)(e=>{L(n=>n?e(n):n)},[]),D=I?.type_id??t?.type_id??null,F=I?.parent_id??t?.parent_id??null,G=2===D&&null!==F?f:(null!==D?p[D]:void 0)??f;return(0,l.jsx)(d.A,{isOpen:e,onClose:C,size:"xl",verticalAlign:"top",contentPadding:"p-0",overlayClassName:"talk-ding-modal-overlay",children:(0,l.jsx)(G,{ding:I,error:T,isRefreshing:N,cityName:y,activeClusters:w,selectedProfile:h,selectedProfileImage:m,onSelectProfile:E,userProfiles:b,isLoadingUserProfiles:v,userProfilesError:k,onClose:C,updateDing:B,onReplyCreated:P},n)})}},41319:()=>{},81552:(e,n,t)=>{"use strict";t.d(n,{Hy:()=>a,Zh:()=>r,as:()=>i,km:()=>l});let l="ml-ding-reply-created";function r(e,n){if(e.id===n.parentId)return e.children?.some(e=>e.id===n.reply.id)?e:{...e,children:[n.reply,...e.children??[]]};if(!e.children?.length)return e;let t=i(e.children,n);return t===e.children?e:{...e,children:t}}function i(e,n){let t=!1,l=e.map(e=>{let l=r(e,n);return t||=l!==e,l});return t?l:e}function a(e){window.dispatchEvent(new CustomEvent(l,{detail:e}))}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.