forked from duneanalytics/DuneQueryRepo
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path2741-d8d78c8d7725a4bd.js.download
2 lines (2 loc) · 15.5 KB
/
2741-d8d78c8d7725a4bd.js.download
1
2
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2741],{97683:function(e,t,n){"use strict";n.d(t,{T3:function(){return c},h4:function(){return l},or:function(){return d},u9:function(){return u}});var r=n(85893),i=n(76415),s=n.n(i),o=n(80403),a=n(11699);function l(e){return(0,r.jsx)(o.h,{...e})}function c(e){return(0,r.jsx)("div",{className:s().page,children:e.children})}function d(e){return(0,r.jsxs)("div",{className:s().mainWrapper,children:[(0,r.jsx)("main",{children:e.children}),(0,r.jsx)(a.R,{})]})}function u(e){return(0,r.jsx)("section",{className:s().pageContent,children:e.children})}},37588:function(e,t,n){"use strict";n.d(t,{Z:function(){return A}});var r=n(85893),i=n(97683),s=n(51681),o=n(25506),a=n(96954),l=n.n(a),c=n(25675),d=n.n(c),u={src:"/_next/static/media/default_error_state.1b722f8b.png",height:432,width:527,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAMAAAACh/xsAAAAGFBMVEX2WzPvZEL1YkD0Xz7yYD70Xz3zXj7yXz4pJqW0AAAACHRSTlMBCBEdM1mhfpkKDbYAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAAtSURBVHicHYvJDQAwDMLAObr/xlXwB8nCkilbkt0NluiuOHbQKc++gnyyR6IPDeQAaRogbtsAAAAASUVORK5CYII=",blurWidth:8,blurHeight:7};function h(e){let{illustration:t=(0,r.jsx)(d(),{alt:"",src:u,width:260,height:210}),title:n="Sorry there's been an error.",description:i="Try another selection.",color:s}=e;return(0,r.jsxs)("div",{className:l().state,style:{"--customColor":"".concat(s)},children:[t,(0,r.jsxs)("div",{className:l().description,children:[(0,r.jsx)("h2",{children:n}),(0,r.jsx)("p",{children:i})]})]})}var p=n(67294),_=n(57831),f=n(28847),v=n.n(f);function g(){return(0,r.jsx)("div",{className:v().loadingOuterWrapper,children:(0,r.jsxs)("div",{className:v().loadingContainer,children:[(0,r.jsx)("div",{className:v().loadingBar}),(0,r.jsx)("div",{className:v().loadingBar}),(0,r.jsx)("div",{className:v().loadingBar}),(0,r.jsx)("div",{className:v().loadingBar}),(0,r.jsx)("div",{className:v().loadingBar}),(0,r.jsx)("div",{className:v().loadingBar})]})})}function A(e){let{result:t,getItems:n,fetchMore:a,renderLoggedOut:l,renderEmpty:c=()=>(0,r.jsx)(o.u,{}),renderLoading:d=()=>(0,r.jsx)(g,{}),renderError:u=()=>(0,r.jsx)(h,{}),renderItems:f}=e,{session:v,sessionLoading:A}=(0,p.useContext)(_.B3);if(l&&!v&&!A)return(0,r.jsx)(i.u9,{children:l()});if(t.error)return(0,r.jsx)(i.u9,{children:u()});if(void 0!==t.data){let e=n(t.data);return 0===e.length?(0,r.jsx)(i.u9,{children:c()}):(0,r.jsxs)(i.u9,{children:[f(e),(0,r.jsx)(s.df,{onChange:e=>e&&(null==a?void 0:a(t)),children:(0,r.jsx)("div",{})})]})}return t.loading,(0,r.jsx)(i.u9,{children:d()})}},25506:function(e,t,n){"use strict";n.d(t,{u:function(){return c}});var r=n(85893),i=n(96954),s=n.n(i),o=n(25675),a=n.n(o),l={src:"/_next/static/media/default_empty_state.625b265e.png",height:596,width:570,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAD1BMVEWQjbyNi7mPjLeQi7eOi7fxBoTGAAAABXRSTlMDEiY8WFVYeR4AAAAJcEhZcwAAITgAACE4AUWWMWAAAAAtSURBVHicJYuxDQAwDIMw9v83V1EXFgBCAhCwBqKtSmK7H9hj1s5dum3edwoeDPUAZT8OWU4AAAAASUVORK5CYII=",blurWidth:8,blurHeight:8};function c(e){let{illustration:t=(0,r.jsx)(a(),{alt:"",src:l,width:190,height:195}),title:n="Nothing to see here",description:i="Try another selection.",color:o}=e;return(0,r.jsxs)("div",{className:s().state,style:{"--customColor":"".concat(o)},children:[t,(0,r.jsxs)("div",{className:s().description,children:[(0,r.jsx)("h2",{children:n}),(0,r.jsx)("p",{children:i})]})]})}},59896:function(e,t,n){"use strict";n.d(t,{a:function(){return d},k:function(){return u}});var r=n(85893),i=n(24745),s=n(83402),o=n.n(s),a=n(1801),l=n(26089),c=n(47730);function d(e){return(0,r.jsx)("td",{className:o().statCell,children:(0,r.jsx)(u,{...e})})}function u(e){let{icon:t,count:n,trending:s}=e;return(0,r.jsxs)("div",{className:o().statAndTrending,children:[!0===s&&(0,r.jsx)("div",{className:o().trending,children:(0,r.jsx)(c.u,{position:"above-center",label:"Trending",children:(0,r.jsx)("div",{children:(0,r.jsx)(a.C,{size:"L",variant:"filled",color:"brand-orange",iconOnly:!0,children:(0,r.jsx)(l.IconChartLineUp,{})})})})}),(0,r.jsxs)("div",{className:o().stat,children:[(0,i.u)(n),t]})]})}},76896:function(e,t,n){"use strict";n.d(t,{i:function(){return o}});var r=n(85893),i=n(83402),s=n.n(i);function o(e){let{children:t}=e;return(0,r.jsx)("table",{className:s().table,children:(0,r.jsx)("tbody",{children:t})})}},59480:function(e,t,n){"use strict";n.d(t,{i:function(){return l}});var r=n(85893),i=n(77251),s=n(26550),o=n(60925),a=n(32980);function l(e){let{category:t}=e;return(0,r.jsxs)(i.$0,{title:"Categories",children:[(0,r.jsxs)(i.FB,{color:"gray",shallow:!0,href:"/discover/content/trending",active:"Content"===t,children:[(0,r.jsx)(s.IconTiles,{}),"Content"]}),(0,r.jsxs)(i.FB,{color:"gray",shallow:!0,href:"/discover/topics/trending",active:"Topics"===t,children:[(0,r.jsx)(o.IconHash,{}),"Topics"]}),(0,r.jsxs)(i.FB,{color:"gray",shallow:!0,href:"/discover/creators/leaderboard",active:"Creators"===t,children:[(0,r.jsx)(a.IconWizardHat,{}),"Creators"]})]})}},77251:function(e,t,n){"use strict";n.d(t,{V1:function(){return x},zt:function(){return A},FB:function(){return g},$0:function(){return v},xv:function(){return b},im:function(){return j}});var r=n(85893),i=n(88894),s=n.n(i),o=n(92265),a=n(94184),l=n.n(a),c=n(67294);n(97884);var d=n(15242),u=n.n(d),h=n(35314),p=n.n(h);let _=(0,c.forwardRef)((e,t)=>{let{active:n=!1,hovered:i=!1,className:s,...o}=e;return(0,r.jsx)("button",{ref:t,...o,className:l()(s,u().chip,p().chip,i&&"hovered",n&&"active")})});function f(e){return(0,r.jsx)("ul",{className:s().panel,children:e.children})}function v(e){return(0,r.jsxs)("li",{className:s().section,children:[(0,r.jsx)("div",{className:s().sectionTitle,children:e.title}),(0,r.jsx)("ul",{children:e.children})]})}function g(e){return(0,r.jsx)("li",{children:(0,r.jsx)(o.M,{...e})})}function A(e){return(0,r.jsx)("li",{children:(0,r.jsx)(_,{...e})})}let x=_,b="span";var m=n(11699);function j(e){return(0,r.jsx)(m.i,{as:"nav",children:(0,r.jsx)(f,{children:e.children})})}},37186:function(e,t,n){"use strict";n.d(t,{V:function(){return d}});var r=n(67294),i=n(45172),s=n(78570),o=n(61575);function a(e){let{view:t,order:n,filter:{freetext:r,isCodeSearch:i,...a},page:l}=e;return{view:t,order:n,filter:a,search:(0,o.HH)(r)?{...(0,s.qp)(r),is_code_search:null!=i&&i}:{},page:l}}var l=n(40551);function c(e){var t,n;let r=e.user?{type:"user",id:e.user.id,handle:e.user.handle}:e.team?{type:"team",id:null!==(t=e.team.id)&&void 0!==t?t:1,handle:null!==(n=e.team.handle)&&void 0!==n?n:""}:void 0;if(!r)throw Error("No owner for ".concat(e.__typename," id=").concat(e.id));return r}function d(e){var t,n,s,o;let{orderBy:d,states:u}=e,h=null===(t=u.searchStringState)||void 0===t?void 0:t.value,p=null===(n=u.timeframeState)||void 0===n?void 0:n.value,_=null===(s=u.typeFilterState)||void 0===s?void 0:s.value,f=null===(o=u.publicnessFilterState)||void 0===o?void 0:o.value,v=(0,r.useCallback)(()=>({view:{version:"Discover 2024",pathname:window.location.pathname},order:{by:d,time_range:p},filter:{freetext:h,type:_,publicness:f},page:1}),[d,p,h,_,f]);(0,r.useEffect)(()=>{var e;e=v(),i.Z.trackEvent("Discover Feed Viewed",a(e))},[v]);let g=(0,r.useCallback)((e,t)=>{!function(e){let{item:t,...n}=e;i.Z.trackEvent("Discover Item Clicked",{item:t,...a(n)})}({...v(),item:function(e,t){let{__typename:n}=e;switch(n){case"Dashboard":return{position:t,type:"dashboard",id:e.id,name:e.name,slug:e.slug,stars:e.starCount,is_trending:e.isTrending,owner:c(e)};case"QueryModel":return{position:t,type:"query",id:e.id,name:e.name,owner:c(e)};case"Tag":return{position:t,type:"tag",name:e.name,stars:e.stars};case"User":return{position:t,type:"wizard",id:e.id,name:e.name,stars:e.receivedStars};case"Team":return{position:t,type:"team",id:e.id,name:e.name,handle:e.handle,stars:e.receivedStars};case void 0:throw Error("__typename will always be defined");default:(0,l.U)(n)}}(e,t)})},[v]);return{trackResultClick:g}}},92265:function(e,t,n){"use strict";n.d(t,{M:function(){return h}});var r=n(85893),i=n(35314),s=n.n(i),o=n(94184),a=n.n(o),l=n(41664),c=n.n(l),d=n(67294),u=n(97884);let h=(0,d.forwardRef)((e,t)=>{let{color:n,active:i=!1,hovered:o=!1,className:l,onOpen:d,...h}=e;return(0,r.jsx)(c(),{ref:t,...h,className:a()(l,s().chip,(0,u.G)({color:n,hovered:o,active:i})),onClick:d,onAuxClick:d})})},97884:function(e,t,n){"use strict";n.d(t,{G:function(){return a}});var r=n(23231),i=n.n(r),s=n(94184),o=n.n(s);function a(e){return o()(i().chip,e.hovered&&"hovered",e.active&&"active",i()["color-".concat(e.color)])}},26089:function(e,t,n){"use strict";n.r(t),n.d(t,{IconChartLineUp:function(){return i}});var r=n(85893);function i(){return(0,r.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M14 13H2V3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M13 4L8 9L6 7L2 11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M13 6.5V4H10.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]})}},20951:function(e,t,n){"use strict";n.r(t),n.d(t,{IconLightning:function(){return i}});var r=n(85893);function i(){return(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M6 15L7 10L3 8.5L10 1L9 6L13 7.5L6 15Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})})}},11699:function(e,t,n){"use strict";n.d(t,{R:function(){return c},i:function(){return l}});var r=n(85893),i=n(1879),s=n.n(i),o=n(94184),a=n.n(o);function l(e){let{as:t}=e;return(0,r.jsx)(t,{className:a()(s().sidebar,s().cssVarContext,s().fullHeightChildren,s().sticky,"hide-on-mobile"),children:e.children})}function c(e){return(0,r.jsx)("div",{className:a()(s().cssVarContext,s().counterweight,e.className,"hide-on-mobile")})}},40551:function(e,t,n){"use strict";function r(e){throw Error("Unreachable code reached")}n.d(t,{U:function(){return r}})},76415:function(e){e.exports={page:"DiscoverPage_page__ph9FD",mainWrapper:"DiscoverPage_mainWrapper__TfinW",pageContent:"DiscoverPage_pageContent__m8obh"}},96954:function(e){e.exports={state:"styles_state__37PkT",description:"styles_description___f0ji"}},83402:function(e){e.exports={table:"styles_table__ro9iA",contentDetails:"styles_contentDetails___Vw__",mainCell:"styles_mainCell__vnAZ6",avatarCell:"styles_avatarCell__zxjXO",nameAndTags:"styles_nameAndTags__8CSWt",titleRow:"styles_titleRow__Svu3m",title:"styles_title__54Ftn",tags:"styles_tags__fQrYX",ownerAndDetails:"styles_ownerAndDetails__JBuUw",statsAndTrending:"styles_statsAndTrending__DEZJS",stat:"styles_stat__ztfBX",topicContent:"styles_topicContent__6GWMo",creator:"styles_creator__vj8e3",statsSet:"styles_statsSet__7_dO2",creatorRow:"styles_creatorRow__87eTV",topicText:"styles_topicText__HMnRY",statAndTrending:"styles_statAndTrending__LTIb1",trending:"styles_trending__pbZNh",statCell:"styles_statCell__vdcPM",topicButton:"styles_topicButton__WgLeR"}},28847:function(e){e.exports={loadingOuterWrapper:"LoadingState_loadingOuterWrapper__R2s8t",loadingContainer:"LoadingState_loadingContainer__jFW_2",loadingBar:"LoadingState_loadingBar__VEYpV",loading:"LoadingState_loading__fNmpf"}},35314:function(e){e.exports={chip:"Chip_chip__6vUbX"}},15242:function(e){e.exports={chip:"ChipDropdown_chip__ZpjTF"}},23231:function(e){e.exports={chip:"chipColor_chip__tI__c","color-gray":"chipColor_color-gray__vWIka","color-yellow":"chipColor_color-yellow__dGpBm","color-green":"chipColor_color-green__YbHER","color-light-blue":"chipColor_color-light-blue__JJTg7","color-blue":"chipColor_color-blue__Lm6T7","color-orange":"chipColor_color-orange__i2y7X"}},88894:function(e){e.exports={panel:"SidePanel_panel__bZFcx",section:"SidePanel_section__tKVhT",sectionTitle:"SidePanel_sectionTitle__JADjc"}},1879:function(e){e.exports={cssVarContext:"Sidebar_cssVarContext___6xoN",sidebar:"Sidebar_sidebar__6FWqI",sticky:"Sidebar_sticky__3pKK2",fullHeightChildren:"Sidebar_fullHeightChildren__f8m2Q",counterweight:"Sidebar_counterweight__08VrG"}},51681:function(e,t,n){"use strict";n.d(t,{YD:function(){return p},df:function(){return h}});var r=n(67294),i=Object.defineProperty,s=(e,t,n)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,o=(e,t,n)=>(s(e,"symbol"!=typeof t?t+"":t,n),n),a=new Map,l=new WeakMap,c=0,d=void 0;function u(e,t,n={},r=d){if(void 0===window.IntersectionObserver&&void 0!==r){let i=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:i,intersectionRect:i,rootBounds:i}),()=>{}}let{id:i,observer:s,elements:o}=function(e){let t=Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{var n;return`${t}_${"root"===t?(n=e.root)?(l.has(n)||(c+=1,l.set(n,c.toString())),l.get(n)):"0":e[t]}`}).toString(),n=a.get(t);if(!n){let r;let i=new Map,s=new IntersectionObserver(t=>{t.forEach(t=>{var n;let s=t.isIntersecting&&r.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=s),null==(n=i.get(t.target))||n.forEach(e=>{e(s,t)})})},e);r=s.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:s,elements:i},a.set(t,n)}return n}(n),u=o.get(e)||[];return o.has(e)||o.set(e,u),u.push(t),s.observe(e),function(){u.splice(u.indexOf(t),1),0===u.length&&(o.delete(e),s.unobserve(e)),0===o.size&&(s.disconnect(),a.delete(i))}}var h=class extends r.Component{constructor(e){super(e),o(this,"node",null),o(this,"_unobserveCb",null),o(this,"handleNode",e=>{!this.node||(this.unobserve(),e||this.props.triggerOnce||this.props.skip||this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=e||null,this.observeNode()}),o(this,"handleChange",(e,t)=>{e&&this.props.triggerOnce&&this.unobserve(),"function"!=typeof this.props.children||this.setState({inView:e,entry:t}),this.props.onChange&&this.props.onChange(e,t)}),this.state={inView:!!e.initialInView,entry:void 0}}componentDidMount(){this.unobserve(),this.observeNode()}componentDidUpdate(e){(e.rootMargin!==this.props.rootMargin||e.root!==this.props.root||e.threshold!==this.props.threshold||e.skip!==this.props.skip||e.trackVisibility!==this.props.trackVisibility||e.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve()}observeNode(){if(!this.node||this.props.skip)return;let{threshold:e,root:t,rootMargin:n,trackVisibility:r,delay:i,fallbackInView:s}=this.props;this._unobserveCb=u(this.node,this.handleChange,{threshold:e,root:t,rootMargin:n,trackVisibility:r,delay:i},s)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){let{children:e}=this.props;if("function"==typeof e){let{inView:t,entry:n}=this.state;return e({inView:t,entry:n,ref:this.handleNode})}let{as:t,triggerOnce:n,threshold:i,root:s,rootMargin:o,onChange:a,skip:l,trackVisibility:c,delay:d,initialInView:u,fallbackInView:h,...p}=this.props;return r.createElement(t||"div",{ref:this.handleNode,...p},e)}};function p({threshold:e,delay:t,trackVisibility:n,rootMargin:i,root:s,triggerOnce:o,skip:a,initialInView:l,fallbackInView:c,onChange:d}={}){var h;let[p,_]=r.useState(null),f=r.useRef(),[v,g]=r.useState({inView:!!l,entry:void 0});f.current=d,r.useEffect(()=>{let r;if(!a&&p)return r=u(p,(e,t)=>{g({inView:e,entry:t}),f.current&&f.current(e,t),t.isIntersecting&&o&&r&&(r(),r=void 0)},{root:s,rootMargin:i,threshold:e,trackVisibility:n,delay:t},c),()=>{r&&r()}},[Array.isArray(e)?e.toString():e,p,s,i,o,a,n,c,t]);let A=null==(h=v.entry)?void 0:h.target,x=r.useRef();p||!A||o||a||x.current===A||(x.current=A,g({inView:!!l,entry:void 0}));let b=[_,v.inView,v.entry];return b.ref=b[0],b.inView=b[1],b.entry=b[2],b}}}]);
//# sourceMappingURL=2741-d8d78c8d7725a4bd.js.map