1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[17221],{17221:function(e,t,a){a.r(t),a.d(t,{default:function(){return f},fetchQueue:function(){return c},updateQueue:function(){return p}});var r=a(57437),l=a(2265),n=a(85330),o=a(83767),s=a(97800),u=a(72168),i=a(46855),d=a(61927);let c=new i.w,p=new i.w;function f(e){var t;let{layoutState:a,setLayoutState:i,filterVersion:f,hasInitialized:y,resetToDefaults:m,setDateState:v,dateState:h}=(0,n.l)(),[S,k]=(0,l.useState)(),[g,O]=(0,l.useState)(),[w,T]=(0,l.useState)(!1),[E,b]=(0,l.useState)(null===(t=e.preloadData)||void 0===t||t),C=(0,d.B)(),[j,N]=(0,l.useState)(),_=async t=>{if(e.queryId){b(!0);try{var a;let r=await C({url:e.queryId,method:null!==(a=e.method)&&void 0!==a?a:"POST",body:t});JSON.stringify(r)!==JSON.stringify(S)&&k(r)}catch(e){console.error(e),k({error:{code:u.K.OperationFailureException,status:500,details:[],message:"",timestamp:new Date().toISOString()}})}b(!1)}},D=async e=>{let{mapping:t}=e;if(a)try{if(null==S?void 0:S.error)O({...g,error:S.error});else{let e=(0,o.IY)({data:null!=S?S:{},layoutState:{...a,...null!=h?h:{}},componentState:{},structure:{},values:t}),r={...g,filter:{...a,...h},...g,...e};r.error&&delete r.error,JSON.stringify(r)!==JSON.stringify(null!=g?g:{})&&O(r)}}catch(e){console.error("src/app/dynamic_components/components/Wrapper/ChildComponentWrapper.handleComponentUpdate",e)}},I=async()=>{var t;N(await (0,o.fz)({structure:e.data,values:e.init})),(null===(t=e.preloadData)||void 0===t||t)&&a&&c.addTask(_,{...a,...null!=h?h:{}}),T(!0)},J=async()=>{a&&c.addTask(_,{...a,...null!=h?h:{}})};return(0,l.useEffect)(()=>{I()},[y]),(0,l.useEffect)(()=>{if(w&&"data"==e.role&&a&&c.addTask(_,{...a,...null!=h?h:{}}),w&&"filter"==e.role){var t;null===(t=e.preloadData)||void 0===t||t?p.addTask(D,{mapping:e.values.filter(e=>"data"===e.source)}):a&&c.addTask(_,{...a,...null!=h?h:{}})}},[f,m]),(0,l.useEffect)(()=>{p.addTask(D,{mapping:e.values.filter(e=>"layout"===e.source)})},[a,h]),(0,l.useEffect)(()=>{w&&S&&Object.keys(S).length>0&&p.addTask(D,{mapping:e.values.filter(e=>"data"===e.source)})},[S]),(0,r.jsx)(s.V,{updateState:t=>{try{var r;let l=new Set(Object.keys(t)),n=(null!==(r=e.output)&&void 0!==r?r:[]).filter(e=>l.has(e.from[0])),o={},s={};n.forEach(e=>{"layout"===e.scope&&("datetime"===e.scopeType?s[e.to[0]]=t[e.from[0]]:o[e.to[0]]=t[e.from[0]])}),Object.keys(o).length>0&&(o={...a,...o},Object.keys(o).forEach(e=>{void 0===o[e]&&delete o[e]}),i(()=>o)),Object.keys(s).length>0&&v(()=>s)}catch(e){console.error("src/app/dynamic_components/components/Wrapper/ChildComponentWrapper.updateState",e)}},type:e.type,id:e.id,...null==j?void 0:j.state,...null==j?void 0:j.dateState,...g,isLoading:E,retry:J,filter:{...a,...null!=h?h:{}},resetToDefaults:m})}}}]);
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.