Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
"use strict";(self.webpackChunkopen_metadata=self.webpackChunkopen_metadata||[]).push([[6557],{94943:function(e,t,n){var a=n(8081),r=n.n(a),i=n(23645),l=n.n(i)()(r());l.push([e.id,'/*\n * Copyright 2022 Collate.\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/*\n * Copyright 2022 Collate.\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* navbar+tab_height+padding = 64+46+12 */\n.advanced-filter-text {\n background: #f8f8f8;\n border-radius: 4px;\n padding: 4px 8px;\n}\n',""]),t.Z=l},96370:function(e,t,n){var a=n(8081),r=n.n(a),i=n(23645),l=n.n(i)()(r());l.push([e.id,'/*\n * Copyright 2024 Collate.\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n.ant-tree-treenode-selected .explore-node-count span {\n color: #fff;\n background: var(--ant-primary-color);\n}\n',""]),t.Z=l},45934:function(e,t,n){var a=n(8081),r=n.n(a),i=n(23645),l=n.n(i)()(r());l.push([e.id,'/*\n * Copyright 2022 Collate.\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/*\n * Copyright 2022 Collate.\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* navbar+tab_height+padding = 64+46+12 */\n.quick-filter-dropdown-trigger-btn .ant-typography {\n color: #757575;\n}\n.explore-page .explore-data-header {\n padding: 13px 14px;\n color: #757575;\n margin-bottom: 0 !important;\n}\n.explore-page .searched-data-container {\n padding: 8px 12px 8px 36px;\n}\n.explore-page .explore-page-tabs .ant-tabs-nav {\n margin-bottom: 8px;\n width: 100%;\n padding: 0 1rem;\n}\n.explore-page .summary-panel-container {\n overflow: hidden;\n height: calc(100vh - var(--ant-navbar-height) - 49px);\n}\n.explore-page .summary-panel-container .ant-drawer-header {\n border-bottom: none;\n}\n.explore-page .sorting-dropdown-container {\n line-height: 24px;\n}\n.explore-page .filters-row {\n border-bottom: 1px solid #0000001a;\n}\n.explore-page a.alert-link {\n font-size: inherit;\n}\n.explore-page .ant-tree .ant-tree-iconEle {\n height: 20px;\n width: 20px;\n}\n.explore-page {\n overflow-x: hidden;\n}\n.explore-page .custom-menu.ant-menu-root.ant-menu-inline .ant-menu-item {\n height: 40px;\n width: 100%;\n}\n.explore-icon svg {\n width: 16px;\n height: 16px;\n color: #292929;\n}\n.ant-menu-item-selected .explore-icon svg {\n color: var(--ant-primary-color);\n}\n.explore-page .explore-tree {\n height: calc(100vh - var(--ant-navbar-height) - 49px);\n overflow: auto;\n}\n.explore-page .explore-tree .ant-tree-switcher-icon {\n width: 12px;\n height: 12px;\n color: #757575;\n}\n.explore-page .explore-tree .ant-tree-switcher_open:hover,\n.explore-page .explore-tree .ant-tree-switcher_close:hover {\n background-color: #f2f2f2;\n}\n.explore-page .explore-tree .ant-tree-title {\n width: 100%;\n padding: 4px;\n}\n.explore-page .explore-tree .ant-tree-node-selected {\n background-color: var(--ant-primary-1) !important;\n}\n.explore-page .explore-tree .ant-tree-treenode {\n padding: 0;\n}\n',""]),t.Z=l},76557:function(e,t,n){n.r(t),n.d(t,{default:function(){return Ke}});var a=n(70655),r=n(56256),i=n(96486),l=n(80129),s=n.n(l),o=n(67294),c=n(15137),u=n(5839),d=n(57119),m=n(10732),p=n(96325),h=n(76772),g=n(28682),f=n(71230),v=n(15746),E=n(12028),y=n(71577),b=n(19650),x=n(62704),S=n(87412),N=n(68432),k=n(76),w=n(26396),C=n(53014),I=n(38780),Z=n(86442),T=n(93379),A=n.n(T),L=n(7795),R=n.n(L),O=n(90569),F=n.n(O),D=n(3565),z=n.n(D),P=n(19216),q=n.n(P),W=n(44589),_=n.n(W),V=n(94943),M={};M.styleTagTransform=_(),M.setAttributes=z(),M.insert=F().bind(null,"head"),M.domAPI=R(),M.insertStyleElement=q(),A()(V.Z,M),V.Z&&V.Z.locals&&V.Z.locals;var Y=function(e){var t=e.filterText,n=e.onEdit,a=(0,N.$)().t;return o.createElement(b.Z,{className:"p-x-xs w-full","data-testid":"advance-search-filter-container",direction:"vertical"},o.createElement(r.Z.Text,{className:"text-grey-muted"},a("label.applied-advanced-search")),o.createElement(b.Z,{align:"center",className:"w-full advanced-filter-text justify-between"},o.createElement(b.Z,{className:"w-full"},o.createElement(C.Z,{alt:"success-badge",className:"align-middle m-l-xs",component:Z.ReactComponent,style:{fontSize:"16px"}}),o.createElement(r.Z,{"data-testid":"advance-search-filter-text"},t)),o.createElement(y.Z,{className:"flex-center","data-testid":"advance-search-filter-btn",icon:o.createElement(I.ReactComponent,{width:16}),type:"text",onClick:n})))},K=n(73546),B=n(71743),U=n(2969),H=n(34669),j=n(61105),J=n(48794),Q=n(53926),$=n(93895),G=n(24671),X=n(17857),ee=n(96840),te=n(18305),ne=n(35850),ae=n(94199),re=n(94184),ie=n.n(re),le=n(69879),se=n(14477),oe=n(99854),ce=n(67871),ue=(n(61887),function(e){var t=e.className,n=e.orientation,r=void 0===n?"vertical":n,i=e.firstPanel,l=e.secondPanel,s=e.pageTitle,c=e.hideFirstPanel,u=void 0!==c&&c,d=(0,N.$)().t,m=(0,a.CR)((0,o.useState)(!1),2),p=m[0],h=m[1];return o.createElement(o.Fragment,null,s&&o.createElement(oe.Z,{title:s}),o.createElement(le.gs,{className:ie()(t,"bg-white resizable-panels-layout"),orientation:r},o.createElement(le.jW,{className:ie()(i.className,"resizable-left-panel",{hidden:u,"left-panel-collapsed":p}),"data-testid":i.className,flex:p?0:i.flex,minSize:p?0:i.minWidth,onStopResize:function(e){var t;null===(t=i.onStopResize)||void 0===t||t.call(i,e.component.props.flex)}},!u&&o.createElement(ce.Z,{overlay:i.overlay},i.children)),o.createElement(le.nN,{className:ie()("splitter left-panel-splitter",{hidden:u},{collapsed:p})},o.createElement(ae.Z,{placement:p?"left":"top",title:d(p?"label.expand":"label.collapse")},o.createElement(y.Z,{className:ie()("collapse-button left-panel-collapse-button",{collapsed:p}),"data-testid":"collapse-button",type:"ghost",onClick:function(){h((function(e){return!e}))}},o.createElement(se.ReactComponent,{className:"collapse-icon"}))),!p&&o.createElement("div",{className:ie()({"panel-grabber-vertical":"vertical"===r,"panel-grabber-horizontal":"horizontal"===r})},o.createElement("div",{className:ie()("handle-icon",{"handle-icon-vertical ":"vertical"===r,"handle-icon-horizontal":"horizontal"===r})}))),o.createElement(le.jW,{className:ie()(l.className,"resizable-second-panel",{"full-width":u||p}),"data-testid":l.className,flex:l.flex,minSize:l.minWidth,onStopResize:function(e){var t;null===(t=l.onStopResize)||void 0===t||t.call(l,e.component.props.flex)}},!u&&o.createElement(ce.Z,{overlay:l.overlay},l.children))))}),de=n(89011),me=n(7573),pe=n(2144),he=n(33394),ge=n(92854),fe=n(22653),ve=n(17888),Ee=n(50322),ye=n(3363),be=n(40734),xe=n(46321),Se=n(96370),Ne={};Ne.styleTagTransform=_(),Ne.setAttributes=z(),Ne.insert=F().bind(null,"head"),Ne.domAPI=R(),Ne.insertStyleElement=q(),A()(Se.Z,Ne),Se.Z&&Se.Z.locals&&Se.Z.locals;var ke=function(e){var t,n,a,l=e.node;return o.createElement("div",{className:"d-flex justify-between"},o.createElement(r.Z.Text,{className:ie()({"m-l-xss":null===(t=l.data)||void 0===t?void 0:t.isRoot}),"data-testid":"explore-tree-title-"+(null!==(a=null===(n=l.data)||void 0===n?void 0:n.dataId)&&void 0!==a?a:l.title)},l.title),!(0,i.isUndefined)(l.count)&&o.createElement("span",{className:"explore-node-count"},(0,$.yh)(l.count)))},we=function(e){var t=e.onFieldValueSelect,n=(0,c.UO)().tab,r=(0,u.J)().onChangeSearchIndex,l=te.Z.getExploreTree(),d=te.Z.staticKeysHavingCounts(),m=(0,a.CR)((0,o.useState)(l),2),p=m[0],h=m[1],g=(0,a.CR)((0,o.useState)([]),2),f=g[0],v=g[1],E=(0,o.useMemo)((function(){return te.Z.getExploreTreeKey(n)}),[n]),y=(0,a.CR)((0,o.useMemo)((function(){var e=s().parse(location.search.startsWith("?")?location.search.substring(1):location.search),t=e.defaultServiceType;return[(0,i.isString)(e.search)?e.search:"",t]}),[location.search]),2),b=y[0],x=y[1],S=function(e,t,n){var a,i;void 0===t&&(t=fe.W.DATABASE),void 0===n&&(n=!1),r(n?null!==(a=Ee.fO[e])&&void 0!==a?a:e:null!==(i=Ee.fO[t])&&void 0!==i?i:t)},N=(0,o.useCallback)((function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){var t,n,r,i,l,s,c,u,d,m,p,g,f,E,y,N,k,w,C,I,Z,T,A,L;return(0,a.Jh)(this,(function(R){switch(R.label){case 0:return R.trys.push([0,2,,3]),S(e.key,null===(Z=e.data)||void 0===Z?void 0:Z.rootIndex,null===(T=e.data)||void 0===T?void 0:T.isRoot),e.children?[2]:(t=null==e?void 0:e.data,n=t.isRoot,r=void 0!==n&&n,i=t.currentBucketKey,l=t.currentBucketValue,s=t.filterField,c=void 0===s?[]:s,u=t.rootIndex,d=r?e.key:null===(A=null==e?void 0:e.data)||void 0===A?void 0:A.parentSearchIndex,m=""!==b?{bucket:ge.An.ENTITY_TYPE,queryFilter:{query:{bool:{}}}}:(0,X.rE)(u===fe.W.DATABASE,null===(L=null==e?void 0:e.data)||void 0===L?void 0:L.filterField,i,l),p=m.bucket,g=m.queryFilter,[4,(0,ve.w4)({query:null!=b?b:"",pageNumber:0,pageSize:0,queryFilter:g,searchIndex:d,includeDeleted:!1,trackTotalHits:!0,fetchSource:!1})]);case 1:return f=R.sent(),E=(0,X.tm)(f.aggregations),y=E[p].buckets.filter((function(e){return!te.Z.notIncludeAggregationExploreTree().includes(e.key)})),N=p===ge.An.SERVICE_TYPE,k=p===ge.An.ENTITY_TYPE,w=y.sort((function(e,t){return e.key.localeCompare(t.key,void 0,{sensitivity:"base"})})),C=w.map((function(t){var n,i,l=(0,be.DO)(),s=void 0;if(k)s=null!==(n=te.Z.getEntityIcon(t.key,"service-icon w-4 h-4"))&&void 0!==n?n:o.createElement(o.Fragment,null);else if(N){var u=ye.Z.getServiceLogo(t.key);s=o.createElement("img",{alt:"logo",src:u,style:{width:18,height:18}})}return t.key.toLowerCase()===x&&v([l]),{title:k?(0,G.q3)(t.key):t.key,count:k?t.doc_count:void 0,key:l,icon:s,isLeaf:p===ge.An.ENTITY_TYPE,data:{currentBucketKey:p,parentSearchIndex:r?e.key:fe.W.DATA_ASSET,currentBucketValue:t.key,filterField:(0,a.ev)((0,a.ev)([],(0,a.CR)(c)),[(0,X.D5)(p,t.key)]),isRoot:!1,rootIndex:r?e.key:null===(i=e.data)||void 0===i?void 0:i.rootIndex,dataId:t.key}}})),h((function(t){return(0,X.JQ)(t,e.key,C)})),[3,3];case 2:return I=R.sent(),(0,xe.Eo)(I),[3,3];case 3:return[2]}}))}))}),[X.JQ,b,x]),k=(0,o.useCallback)((function(e){return e.expanded?o.createElement(pe.ReactComponent,null):o.createElement(he.ReactComponent,null)}),[]),w=(0,o.useCallback)((function(e,n){var a,r,i,l,s,o,c=n.node,u=null===(a=c.data)||void 0===a?void 0:a.filterField;if(u)t(u);else if(c.isLeaf){var d=[(0,X.D5)(ge.An.ENTITY_TYPE,null===(r=c.data)||void 0===r?void 0:r.entityType)];t(d)}else(null===(i=c.data)||void 0===i?void 0:i.childEntities)&&t([(0,X.Yj)(ge.An.ENTITY_TYPE,null===(l=c.data)||void 0===l?void 0:l.childEntities)]);S(c.key,null===(s=c.data)||void 0===s?void 0:s.rootIndex,null===(o=c.data)||void 0===o?void 0:o.isRoot),v([c.key])}),[t]),C=(0,o.useCallback)((function(){return(0,a.mG)(void 0,void 0,void 0,(function(){var e,t,n;return(0,a.Jh)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,(0,ve.w4)({query:null!=b?b:"",pageNumber:0,pageSize:0,queryFilter:{},searchIndex:fe.W.DATA_ASSET,includeDeleted:!1,trackTotalHits:!0,fetchSource:!1})];case 1:return e=a.sent(),t=e.aggregations.entityType.buckets,n={},t.forEach((function(e){n[e.key]=e.doc_count,d.includes(e.key)&&h((function(t){return(0,X.i$)(t,e.key,e.doc_count)}))})),[3,3];case 2:return a.sent(),[3,3];case 3:return[2]}}))}))}),[d]);return(0,o.useEffect)((function(){C()}),[]),o.createElement(me.Z,{blockNode:!0,showIcon:!0,className:"explore-tree p-sm p-t-0","data-testid":"explore-tree",defaultExpandedKeys:E,loadData:N,selectedKeys:f,switcherIcon:k,titleRender:function(e){return o.createElement(ke,{node:e})},treeData:p,onSelect:w})},Ce=n(50970),Ie=n(62761),Ze=n(92693),Te=n(34005),Ae=n(74475),Le=[{step:1,title:Ae.Z.t("label.ingest-sample-data"),description:Ae.Z.t("message.run-sample-data-to-ingest-sample-data"),link:Ze.u9},{step:2,title:Ae.Z.t("label.start-elasticsearch-docker"),description:Ae.Z.t("message.ensure-elasticsearch-is-up-and-running"),link:Ze.Cf},{step:3,title:Ae.Z.t("label.install-service-connectors"),description:Ae.Z.t("message.checkout-service-connectors-doc"),link:Ze.lS},{step:4,title:Ae.Z.t("label.more-help"),description:Ae.Z.t("message.still-running-into-issue"),link:Ze.IH}],Re=function(e){var t=e.type,n=e.errorMessage,a=e.query,i=null!=a?a:{},l=i.showDeleted,s=i.search,u=i.queryFilter,d=i.quickFilter,m=(0,c.UO)().tab,p=(0,N.$)().t,h=(0,c.k6)(),g=(0,Te.z)().activeDomain,E=(0,J.N)().theme,y=(0,o.useMemo)((function(){return Boolean(s||u||d||"true"===l)}),[s,u,d,l]),x=(0,o.useMemo)((function(){return o.createElement("div",{className:"text-center","data-testid":"no-search-results"},y?o.createElement(w.Z,{type:j.Wx.FILTER}):["glossaries","tags"].includes(m)?o.createElement(w.Z,{permission:!0,doc:"tags"===m?Ze.uo:Ze.cK,heading:p("tags"===m?"label.tag-plural":"label.glossary"),type:j.Wx.CREATE,onClick:function(){return h.push("tags"===m?Ie.Z6.TAGS:Ie.Z6.GLOSSARY)}}):o.createElement(w.Z,{type:j.Wx.CUSTOM},o.createElement(r.Z.Paragraph,{style:{marginBottom:"0"}},p("message.no-data-available-entity",{entity:g})),o.createElement(r.Z.Paragraph,{style:{marginBottom:"0"}},p("message.add-data-asset-domain",{domain:g})),o.createElement(r.Z.Paragraph,null,o.createElement($.u1,{i18nKey:"message.refer-to-our-doc",renderElement:o.createElement("a",{href:Ze.GP,rel:"noreferrer",style:{color:E.primaryColor},target:"_blank"}),values:{doc:p("label.doc-plural-lowercase")}}))))}),[y]),S=(0,o.useMemo)((function(){var e,t=null===(e=null==n?void 0:n.split("[")[3])||void 0===e?void 0:e.split("]")[0],a=n&&t?"find "+t+" in":"access";return o.createElement("div",{"data-testid":"es-error"},o.createElement("div",{className:"m-b-lg text-center"},o.createElement("p",null,o.createElement("span",null,p("message.welcome-to-open-metadata")," "),o.createElement("span",{"data-testid":"error-text"},p("message.unable-to-error-elasticsearch",{error:a}))),o.createElement("p",null,p("message.elasticsearch-setup"))),o.createElement(f.Z,{gutter:16},Le.map((function(e){return o.createElement(v.Z,{key:e.step,span:6},o.createElement(b.Z,{className:"justify-between h-full border rounded-4 p-sm",direction:"vertical"},o.createElement("div",null,o.createElement("div",{className:"d-flex m-b-xs"},o.createElement("div",{className:"flex-center rounded-full h-10 w-10 border-2-primary text-primary text-lg font-bold"},e.step)),o.createElement("h6",{className:"text-base text-grey-body font-medium","data-testid":"service-name"},e.title),o.createElement("p",{className:"text-grey-body text-sm m-b-lg"},e.description)),o.createElement("p",null,o.createElement("a",{href:e.link,rel:"noopener noreferrer",target:"_blank"},p("label.click-here")+" >>"))))}))))}),[n]);return o.createElement("div",{className:"mt-12 text-base font-medium"},t===j.NS.NO_DATA?x:S)},Oe=n(46343),Fe=["table_name","topic_name","dashboard_name","pipeline_name"],De=function(e){var t=e.children,n=e.data,r=e.isLoading,l=void 0!==r&&r,c=e.onPaginationChange,u=e.showResultCount,d=void 0!==u&&u,m=e.totalValue,p=e.isFilterSelected,h=e.isSummaryPanelVisible,g=e.selectedEntityId,f=e.handleSummaryPanelDisplay,v=e.filter,E=(0,o.useMemo)((function(){return n.map((function(e,t){var n=e._source,r=e.highlight,i=r?Object.entries(r).filter((function(e){return!(0,a.CR)(e,1)[0].includes(".ngram")})).map((function(e){var t=(0,a.CR)(e,2),n=t[0],r=t[1];return{key:n,value:(null==r?void 0:r.length)||1}})).filter((function(e){return!Fe.includes(e.key)})):[],l=(0,G.Eb)(n,r);return o.createElement("div",{className:"m-b-md",key:"tabledatacard"+t},o.createElement(Oe.Z,{className:ie()(n.id===g&&h?"highlight-card":""),handleSummaryPanelDisplay:f,id:"tabledatacard"+t,matches:i,showTags:!1,source:l}))}))}),[n,h,f,g]),y=(0,o.useMemo)((function(){return s().parse(location.search.startsWith("?")?location.search.substr(1):location.search)}),[location.search]),b=y.page,x=void 0===b?1:b,S=y.size,N=void 0===S?Ie.IV:S;return o.createElement(o.Fragment,null,l?o.createElement(ne.Z,null):o.createElement("div",{"data-testid":"search-container"},m>0?o.createElement(o.Fragment,null,t,o.createElement((function(){return d&&(p||(null==v?void 0:v.quickFilter))?H.z5===m?o.createElement("div",null,"About "+m+" results"):o.createElement("div",null,(0,$._6)(m,"result")):null}),null),o.createElement("div",{"data-testid":"search-results"},E,o.createElement(Ce.Z,{hideOnSinglePage:!0,className:"text-center m-b-sm",current:(0,i.isNumber)(Number(x))?Number(x):1,pageSize:N&&(0,i.isNumber)(Number(N))?Number(N):Ie.IV,pageSizeOptions:[10,25,50],total:m,onChange:c}))):o.createElement(o.Fragment,null,t,o.createElement(Re,{query:v,type:j.NS.NO_DATA}))))},ze=n(45934),Pe={};Pe.styleTagTransform=_(),Pe.setAttributes=z(),Pe.insert=F().bind(null,"head"),Pe.domAPI=R(),Pe.insertStyleElement=q(),A()(ze.Z,Pe),ze.Z&&ze.Z.locals&&ze.Z.locals;var qe,We=function(){var e=(0,J.N)().theme,t=(0,N.$)().t;return o.createElement(h.Z,{closable:!0,description:o.createElement("div",{className:"d-flex items-start gap-3"},o.createElement(d.Z,{style:{color:e.errorColor,fontSize:"16px"}}),o.createElement("div",{className:"d-flex flex-col gap-2"},o.createElement(r.Z.Text,{className:"font-semibold text-xs"},t("server.indexing-error")),o.createElement(r.Z.Paragraph,{className:"m-b-0 text-xs"},o.createElement($.u1,{i18nKey:"message.configure-search-re-index",renderElement:o.createElement(k.Link,{className:"alert-link",to:(0,ee.aZ)(H.i4)}),values:{settings:t("label.search-index-setting-plural")}})))),type:"error"})},_e=function(e){var t,n,l,c,d,h,k,C=e.aggregations,I=e.activeTabKey,Z=e.tabItems,T=void 0===Z?[]:Z,A=e.searchResults,L=e.onChangeAdvancedSearchQuickFilters,R=e.searchIndex,O=e.sortOrder,F=e.onChangeSortOder,D=e.sortValue,z=e.onChangeSortValue,P=e.onChangeShowDeleted,q=e.onChangeSearchIndex,W=e.showDeleted,_=e.onChangePage,V=void 0===_?i.noop:_,M=e.loading,J=e.quickFilters,$=e.isElasticSearchIssue,ee=te.Z.getTabsInfo(),ae=(0,N.$)().t,re=(0,a.CR)((0,o.useState)([]),2),ie=re[0],le=re[1],se=(0,a.CR)((0,o.useState)(!1),2),oe=se[0],ce=se[1],me=(0,a.CR)((0,o.useState)(),2),pe=me[0],he=me[1],ge=null===(t=null==A?void 0:A.hits)||void 0===t?void 0:t.hits[0],fe=(0,o.useMemo)((function(){return s().parse(location.search.startsWith("?")?location.search.substring(1):location.search)}),[location.search]),ve=(0,o.useMemo)((function(){return(0,i.isString)(fe.search)?fe.search:""}),[location.search]),Ee=(0,u.J)(),ye=Ee.toggleModal,be=Ee.sqlQuery,xe=Ee.onResetAllFilters,Se=function(){ce(!1)},Ne=(0,o.useMemo)((function(){return O===j.mX.ASC}),[O]),ke=(0,o.useMemo)((function(){return{className:"text-base text-grey-muted","data-testid":"last-updated"}}),[]),Ce=(0,o.useCallback)((function(e){ce(!0),he(e)}),[]),Ie=function(e){var t=(0,X.L8)(e);L((0,i.isEmpty)(t)?void 0:{query:{bool:{must:t}}})};return(0,o.useEffect)((function(){var e=function(e){"Escape"===e.key&&Se()};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[]),(0,o.useEffect)((function(){var e=(0,Q.tp)(I),t=(0,X.hH)(e,J);le(e.map((function(e){var n;return(0,a.pi)((0,a.pi)({},e),{value:null!==(n=null==t?void 0:t[e.label])&&void 0!==n?n:[]})})))}),[I,J]),(0,o.useEffect)((function(){var e;!(0,i.isUndefined)(A)&&(null===(e=null==A?void 0:A.hits)||void 0===e?void 0:e.hits[0])?Ce((0,G.Eb)(ge._source,null==ge?void 0:ge.highlight)):(ce(!1),he(void 0))}),[A]),0!==T.length||ve?o.createElement("div",{className:"explore-page bg-white","data-testid":"explore-page"},T.length>0&&o.createElement(ue,{className:"content-height-with-resizable-panel",firstPanel:{className:"content-resizable-panel-container",minWidth:280,flex:.13,children:o.createElement(S.default,{className:"bg-white",width:"100%"},o.createElement(r.Z.Paragraph,{className:"explore-data-header"},ae("label.data-asset-plural")),ve?o.createElement(g.Z,{className:"custom-menu","data-testid":"explore-left-panel",items:T,mode:"inline",rootClassName:"left-container",selectedKeys:[I],onClick:function(e){e&&e.key!==I&&(q(e.key),ce(!1))}}):o.createElement(we,{onFieldValueSelect:Ie}))},pageTitle:ae("label.explore"),secondPanel:{children:o.createElement(x.Content,null,o.createElement(f.Z,{className:"filters-row"},o.createElement(v.Z,{className:"searched-data-container w-full"},o.createElement(f.Z,{gutter:[0,8]},o.createElement(v.Z,null,o.createElement(B.Z,{aggregations:C,fields:ie,fieldsWithNullValues:H.mH,index:I,showDeleted:W,onAdvanceSearch:function(){return ye(!0)},onChangeShowDeleted:P,onFieldValueSelect:function(e){le((function(t){var n=t.map((function(t){return t.key===e.key?e:t}));return Ie(n),n}))}})),o.createElement(v.Z,{className:"d-flex items-center justify-end gap-4",flex:410},o.createElement("span",{className:"flex-center"},o.createElement(E.Z,{checked:W,"data-testid":"show-deleted",onChange:P}),o.createElement(r.Z.Text,{className:"p-l-xs text-grey-muted"},ae("label.deleted"))),(J||be)&&o.createElement(r.Z.Text,{className:"text-primary self-center cursor-pointer","data-testid":"clear-filters",onClick:function(){xe()}},ae("label.clear-entity",{entity:""})),o.createElement(r.Z.Text,{className:"text-primary self-center cursor-pointer","data-testid":"advance-search-button",onClick:function(){return ye(!0)}},ae("label.advanced-entity",{entity:""})),o.createElement("span",{className:"sorting-dropdown-container"},o.createElement(U.Z,{fieldList:null!==(l=null===(n=ee[R])||void 0===n?void 0:n.sortingFields)&&void 0!==l?l:H.kg,handleFieldDropDown:z,sortField:D}),o.createElement(y.Z,{className:"p-0","data-testid":"sort-order-button",size:"small",type:"text",onClick:function(){return F(Ne?j.mX.DESC:j.mX.ASC)}},Ne?o.createElement(m.Z,(0,a.pi)({style:{fontSize:"14px"}},ke)):o.createElement(p.Z,(0,a.pi)({style:{fontSize:"14px"}},ke))))),$?o.createElement(v.Z,{span:24},o.createElement(We,null)):o.createElement(o.Fragment,null),be&&o.createElement(v.Z,{span:24},o.createElement(Y,{filterText:be,onEdit:function(){return ye(!0)}}))))),o.createElement(de.Z,{className:"explore-content-height-resizable-panel",firstPanel:{className:"explore-resizable-panel-container",children:o.createElement(f.Z,{className:"p-t-md"},o.createElement(v.Z,{lg:{offset:2,span:19},md:{offset:0,span:24}},M||$?o.createElement(o.Fragment,null):o.createElement(De,{isFilterSelected:!0,data:null!==(c=null==A?void 0:A.hits.hits)&&void 0!==c?c:[],filter:fe,handleSummaryPanelDisplay:Ce,isSummaryPanelVisible:oe,selectedEntityId:(null==pe?void 0:pe.id)||"",totalValue:null!==(d=null==A?void 0:A.hits.total.value)&&void 0!==d?d:0,onPaginationChange:V}),M?o.createElement(ne.Z,null):o.createElement(o.Fragment,null))),minWidth:600,flex:.65},hideSecondPanel:!oe&&!M&&!pe,pageTitle:ae("label.explore"),secondPanel:{children:oe&&pe&&!M&&o.createElement(K.Z,{entityDetails:{details:pe},handleClosePanel:Se,highlights:(0,i.omit)((0,a.pi)((0,a.pi)({},null==ge?void 0:ge.highlight),{"tag.name":(null!==(k=null===(h=null==ie?void 0:ie.find((function(e){return e.key===H.Dg})))||void 0===h?void 0:h.value)&&void 0!==k?k:[]).map((function(e){return e.key}))}),["description","displayName"])}),minWidth:400,flex:.35,className:"entity-summary-resizable-right-panel-container explore-resizable-panel-container"}})),className:"content-resizable-panel-container",minWidth:800,flex:.87}}),ve&&0===T.length&&!M&&o.createElement(b.Z,{align:"center",className:"w-full flex-center full-height","data-testid":"no-search-results",direction:"vertical",size:48},o.createElement(w.Z,{className:"mt-0-important",type:j.Wx.FILTER})),ve&&0===T.length&&M&&o.createElement(ne.Z,null)):o.createElement(ne.Z,null)},Ve=n(71225),Me=n(68670),Ye=n(67745),Ke=(qe=function(){var e=te.Z.getTabsInfo(),t=te.Z.getEntityTypeSearchIndexMapping(),n=(0,c.TH)(),l=(0,c.k6)(),d=(0,Me.Fb)().isTourOpen,m=Object.keys(e),p=(0,c.UO)().tab,h=(0,J.N)().searchCriteria,g=(0,a.CR)((0,o.useState)(),2),f=g[0],v=g[1],E=(0,a.CR)((0,o.useState)(!1),2),y=E[0],b=E[1];(0,o.useEffect)((function(){b(!1),v(void 0)}),[p]);var x=(0,a.CR)((0,o.useState)(),2),S=x[0],N=x[1],k=(0,a.CR)((0,o.useState)(),2),w=k[0],C=k[1],I=(0,a.CR)((0,o.useState)(),2),Z=I[0],T=I[1],A=(0,a.CR)((0,o.useState)(!0),2),L=A[0],R=A[1],O=(0,u.J)().queryFilter,F=(0,a.CR)((0,o.useMemo)((function(){var e=s().parse(n.search.startsWith("?")?n.search.substring(1):n.search);return[e,(0,i.isString)(e.search)?e.search:"",(0,i.isString)(e.sort)?e.sort:H.dM,(0,i.isString)(e.sortOrder)?e.sortOrder:j.mX.DESC]}),[n.search]),4),D=F[0],z=F[1],P=F[2],q=F[3],W=function(e,t){l.push({search:s().stringify((0,a.pi)((0,a.pi)({},D),{page:e,size:null!=t?t:Ie.IV}))})},_=(0,o.useMemo)((function(){var e=(0,i.get)(w,"query.bool.must",[]).filter((function(e){var t=(0,i.get)(e,"bool.should",[]),n=(0,X.Q3)(t);return!(0,i.isEmpty)(t)&&H.nM.find((function(e){return n.includes(e)}))}));return(0,i.isEmpty)(e)?void 0:{query:{bool:{must:e}}}}),[w]),V=(0,o.useCallback)((function(t){var n,a;l.push((0,Ie.rg)({tab:e[t].path,extraParameters:{sort:z?"_score":e[t].sortField,page:"1",quickFilter:_?JSON.stringify(_):void 0,sortOrder:null!==(a=null===(n=e[t])||void 0===n?void 0:n.sortOrder)&&void 0!==a?a:j.mX.DESC},isPersistFilters:!0}))}),[_,z]),M=(0,o.useCallback)((function(e){l.push({search:s().stringify((0,a.pi)((0,a.pi)({},D),{quickFilter:e?JSON.stringify(e):void 0,page:1}))})}),[l,D]),Y=(0,o.useMemo)((function(){if(!z)return fe.W.DATA_ASSET;var t=Object.entries(e).find((function(e){return(0,a.CR)(e,2)[1].path===p}));if(Z&&(0,i.isNil)(t)){var n=(0,X.s1)(Z,e);return null!=n?n:fe.W.TABLE}return(0,i.isNil)(t)?fe.W.TABLE:t[0]}),[p,Z,z]),K=(0,o.useMemo)((function(){var t=Object.entries(e).map((function(e){var t=(0,a.CR)(e,2),n=t[0],l=t[1],s=l.icon;return{key:n,label:o.createElement("div",{className:"d-flex items-center justify-between","data-testid":(0,i.lowerCase)(l.label)+"-tab"},o.createElement("div",{className:"d-flex items-center"},o.createElement("span",{className:"explore-icon d-flex m-r-xs"},o.createElement(s,null)),o.createElement(r.Z.Text,{className:n===Y?"text-primary":""},l.label)),o.createElement("span",null,(0,i.isNil)(Z)?(0,$.yh)():(0,$.yh)(Z[n],"",n===Y))),count:Z?Z[n]:0}}));return z?t.filter((function(e){return e.count>0||e.key===h})):t}),[e,Z,Y]),B=(0,o.useMemo)((function(){var e=D.page;return!(0,i.isString)(e)||isNaN(Number.parseInt(e))?1:Number.parseInt(e)}),[D.page]),U=(0,o.useMemo)((function(){var e=D.size;return!(0,i.isString)(e)||isNaN(Number.parseInt(e))?Ie.IV:Number.parseInt(e)}),[D.size]);(0,o.useEffect)((function(){(0,i.isEmpty)(D)||W(B,U)}),[B,U,D]);var Q=(0,o.useMemo)((function(){return"true"===D.showDeleted}),[D.showDeleted]),G=(0,o.useCallback)((function(){if((0,i.isString)(D.quickFilter))try{var e=JSON.parse(D.quickFilter);return C(e),e}catch(e){return void C(void 0)}else C(void 0)}),[D]);(0,o.useEffect)((function(){d?T(Ve.TC):function(){var e=G(),n=(0,Ye.rO)(e,O);R(!0);var a=[(0,ve.w4)({query:(0,i.isEmpty)(z)?"":(0,be.i3)(z),searchIndex:Y,queryFilter:n,sortField:P,sortOrder:q,pageNumber:B,pageSize:U,includeDeleted:Q}).then((function(e){v(e),N(e.aggregations)}))];if(z){var r=(0,ve.w4)({query:(0,be.i3)(z),pageNumber:0,pageSize:0,queryFilter:n,searchIndex:fe.W.ALL,includeDeleted:Q,trackTotalHits:!0,fetchSource:!1,filters:""}).then((function(e){var n=e.aggregations.entityType.buckets,a={};n.forEach((function(e){var n=e&&t[e.key];m.includes(n)&&(a[null!=n?n:""]=e.doc_count)})),T(a)}));a.push(r)}Promise.all(a).catch((function(e){var t,n;(null===(t=e.response)||void 0===t?void 0:t.data.message.includes(H.bx))||(null===(n=e.response)||void 0===n?void 0:n.data.message.includes(H.F))?b(!0):(0,xe.Eo)(e)})).finally((function(){return R(!1)}))}()}),[D.quickFilter,O,z,P,q,Q,Y,B,U]);var ee=(0,o.useCallback)((function(e){W(1),C(e),M(e)}),[C,l,D]);return o.createElement(_e,{activeTabKey:Y,aggregations:S,isElasticSearchIssue:y,loading:L&&!d,quickFilters:w,searchIndex:Y,searchResults:d?Ve.R0:f,showDeleted:Q,sortOrder:q,sortValue:P,tabItems:K,onChangeAdvancedSearchQuickFilters:ee,onChangePage:W,onChangeSearchIndex:V,onChangeShowDeleted:function(e){l.push({search:s().stringify((0,a.pi)((0,a.pi)({},D),{showDeleted:e,page:1}))})},onChangeSortOder:function(e){!function(e,t){l.push({search:s().stringify((0,a.pi)((0,a.pi)({},D),{page:1,size:null!=U?U:Ie.IV,sortOrder:t}))})}(0,e)},onChangeSortValue:function(e){!function(e,t){l.push({search:s().stringify((0,a.pi)((0,a.pi)({},D),{page:1,size:null!=U?U:Ie.IV,sort:t}))})}(0,e)}})},function(e){return o.createElement(u.s,null,o.createElement(qe,(0,a.pi)({},e)))})}}]);