(self.webpackChunk_dagster_io_dagit_app=self.webpackChunk_dagster_io_dagit_app||[]).push([[523],{93523:function(t,n,e){"use strict";e.r(n),e.d(n,{layoutAssetGraph:function(){return f},ASSET_LINK_NAME_MAX_LENGTH:function(){return d},getAssetLinkDimensions:function(){return h},padBounds:function(){return c},extendBounds:function(){return g},ASSET_NODE_NAME_MAX_LENGTH:function(){return p},getAssetNodeDimensions:function(){return y}});var r=e(47427),o=e(13357),i=e(21663),u=e.n(i),a=100,s="group__",f=function(t){var n=new o.graphlib.Graph({compound:!0});n.setGraph({rankdir:"TB",marginx:a,marginy:a,nodesep:40,edgesep:10,ranksep:10}),n.setDefaultEdgeLabel((function(){return{}}));var e,i=function(t){return[s,t.definition.repository.location.name,t.definition.repository.name,t.definition.groupName].join("__")},f=function(t){return t},d=Object.values(t.nodes).filter(f),p={},l=(0,r.Z)(d);try{for(l.s();!(e=l.n()).done;){var v=e.value;if(v.definition.groupName){var b=i(v);p[b]={id:b,groupName:v.definition.groupName,repositoryName:v.definition.repository.name,repositoryLocationName:v.definition.repository.location.name,repositoryDisambiguationRequired:!1,bounds:{x:0,y:0,width:0,height:0}}}}}catch(L){l.e(L)}finally{l.f()}var m=Object.keys(p).length>1;m&&Object.keys(p).forEach((function(t){return n.setNode(t,{})})),d.forEach((function(t){n.setNode(t.id,y(t.definition)),m&&t.definition.groupName&&n.setParent(t.id,i(t))}));var w={};Object.keys(t.downstream).forEach((function(e){Object.keys(t.downstream[e]).forEach((function(r){(t.nodes[r]||t.nodes[e])&&(n.setEdge({v:e,w:r},{weight:1}),t.nodes[r]?t.nodes[e]||(w[e]=!0):w[r]=!0)}))})),Object.keys(w).forEach((function(t){n.setNode(t,h())})),o.layout(n);var x=0,_=0,N={};if(n.nodes().forEach((function(t){var e=n.node(t);if(e){var r={x:e.x-e.width/2,y:e.y-e.height/2,width:e.width,height:e.height};t.startsWith(s)||(N[t]={id:t,bounds:r}),x=Math.max(x,e.x+e.width/2),_=Math.max(_,e.y+e.height/2)}})),m){var E,O=(0,r.Z)(d);try{for(O.s();!(E=O.n()).done;){var j=E.value;if(j.definition.groupName){var k=i(j);p[k].bounds=0===p[k].bounds.width?N[j.id].bounds:g(p[k].bounds,N[j.id].bounds)}}}catch(L){O.e(L)}finally{O.f()}for(var A=0,M=Object.values(p);A<M.length;A++){var S=M[A];S.bounds=c(S.bounds,{x:15,top:70,bottom:-10})}}Object.values(u()(Object.values(p),(function(t){return t.groupName}))).filter((function(t){return t.length>1})).flat().forEach((function(t){t.bounds.y-=18,t.bounds.height+=18,t.repositoryDisambiguationRequired=!0}));var D=[];return n.edges().forEach((function(t){var e=n.node(t.v),r=w[t.v]?16:24,o=n.node(t.w),i=w[t.w]?16:24;D.push({from:{x:e.x-e.width/2+r,y:e.y-30+e.height/2},fromId:t.v,to:{x:o.x-o.width/2+i,y:o.y+20-o.height/2},toId:t.w})})),{nodes:N,edges:D,width:x+a,height:_+a,groups:m?p:{}}},d=10,h=function(){return{width:106,height:90}},c=function(t,n){return{x:t.x-n.x,y:t.y-n.top,width:t.width+2*n.x,height:t.height+n.top+n.bottom}},g=function(t,n){var e=Math.min(t.x,n.x),r=Math.min(t.y,n.y);return{x:e,y:r,width:Math.max(t.x+t.width,n.x+n.width)-e,height:Math.max(t.y+t.height,n.y+n.height)-r}},p=28,y=function(t){if(t.isSource&&!t.isObservable)return{width:265,height:102};var n=100;return t.isPartitioned&&(n+=40),t.isSource?n+=30:n+=26,{width:265,height:n+=30}}},56277:function(t){t.exports=function(t,n,e,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var u=t[o];n(r,u,e(u),t)}return r}},414:function(t,n,e){var r=e(99383);t.exports=function(t,n,e,o){return r(t,(function(t,r,i){n(o,t,e(t),i)})),o}},53004:function(t,n,e){var r=e(56277),o=e(414),i=e(57777),u=e(18981);t.exports=function(t,n){return function(e,a){var s=u(e)?r:o,f=n?n():{};return s(e,t,i(a,2),f)}}},21663:function(t,n,e){var r=e(72983),o=e(53004),i=Object.prototype.hasOwnProperty,u=o((function(t,n,e){i.call(t,e)?t[e].push(n):r(t,e,[n])}));t.exports=u},47427:function(t,n,e){"use strict";e.d(n,{Z:function(){return o}});var r=e(5693);function o(t,n){var e="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=(0,r.Z)(t))||n&&t&&"number"===typeof t.length){e&&(t=e);var o=0,i=function(){};return{s:i,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,a=!0,s=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){s=!0,u=t},f:function(){try{a||null==e.return||e.return()}finally{if(s)throw u}}}}}}]);
//# sourceMappingURL=523.6f51e425.chunk.js.map