1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8798],{22388:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return g}});var r=n(67294),o=n(42614),i=n(59499),a=n(27812),s=n(16835),c=n(36851);function getParams(e,t){var n,r=getNodeCenter(e),o=getNodeCenter(t),i=function(e,t){var n=e[c.xB].handleBounds.source.find(function(e){return e.position===t});if(!n)return[0,0];var r=n.width/2,o=n.height/2;switch(t){case c.Ly.Left:r=0;break;case c.Ly.Right:r=n.width;break;case c.Ly.Top:o=0;break;case c.Ly.Bottom:o=n.height}return[e.positionAbsolute.x+n.x+r,e.positionAbsolute.y+n.y+o]}(e,n=Math.abs(r.x-o.x)>Math.abs(r.y-o.y)?r.x>o.x?c.Ly.Left:c.Ly.Right:r.y>o.y?c.Ly.Top:c.Ly.Bottom),a=(0,s.Z)(i,2);return[a[0],a[1],n]}function getNodeCenter(e){return{x:e.positionAbsolute.x+e.width/2,y:e.positionAbsolute.y+e.height/2}}n(3547);var u=n(85893),l=n(66694);function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){(0,i.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var d={bravoPageNode:function(e){var t=e.data;return(0,u.jsxs)("div",{className:"rounded",children:[(0,u.jsx)("div",{children:t.label}),(0,u.jsx)("div",{children:(0,u.jsx)("img",{src:t.image,alt:"screen",width:e.width,height:e.height})}),t.inputs&&t.inputs.map(function(e,t){return(0,u.jsx)("div",{className:"rounded bg-accent-01 text-white m-1 p-1 inline-block",children:e.name},t)}),(0,u.jsx)(c.HH,{type:"source",position:c.Ly.Top,id:"a"}),(0,u.jsx)(c.HH,{type:"source",position:c.Ly.Right,id:"b"}),(0,u.jsx)(c.HH,{type:"source",position:c.Ly.Bottom,id:"c"}),(0,u.jsx)(c.HH,{type:"source",position:c.Ly.Left,id:"d"})]})}},f={bravoPageEdge:function(e){var t,n,o,i,a,l,d,f=(0,c.oR)((0,r.useCallback)(function(t){return t.nodeInternals.get(e.source)},[e.source])),p=(0,c.oR)((0,r.useCallback)(function(t){return t.nodeInternals.get(e.target)},[e.target]));if(!f||!p)return null;var h=(t=getParams(f,p),o=(n=(0,s.Z)(t,3))[0],i=n[1],a=n[2],l=getParams(p,f),{sx:o,sy:i,tx:(d=(0,s.Z)(l,3))[0],ty:d[1],sourcePos:a,targetPos:d[2]}),y=h.sx,g=h.sy,b=h.tx,v=h.ty,m=h.sourcePos,j=h.targetPos,w=(0,c.OQ)({sourceX:y,sourceY:g,sourcePosition:m,targetPosition:j,targetX:b,targetY:v}),x=(0,s.Z)(w,1)[0];return(0,u.jsx)("path",{id:e.id,className:"react-flow__edge-path",d:x,strokeWidth:5,markerEnd:e.markerEnd,style:e.style})}},apps_TreeView=function(){var e,t,n=(0,l.HD)().appData,o=(0,c.Rr)([]),i=(0,s.Z)(o,3),p=i[0],h=i[1],y=i[2],g=(0,c.ll)([]),b=(0,s.Z)(g,3),v=b[0],m=b[1],j=b[2],w=(0,r.useCallback)(function(e){return m(function(t){return(0,c.Z_)(e,t)})},[]),x=(0,r.useState)(null),P=x[0],k=x[1],_=null!==(e=null===(t=n.data)||void 0===t?void 0:t.contents)&&void 0!==e?e:[];return(0,r.useEffect)(function(){h(null==_?void 0:_.map(function(e,t){return{id:e.id,data:{label:e.name||"",image:e.preview.cdnUrl||"",inputs:e.inputs||[]},position:{x:e.data.originalAbsolutePosition&&e.data.originalAbsolutePosition.x||300*t,y:e.data.originalAbsolutePosition&&e.data.originalAbsolutePosition.y||0},type:"bravoPageNode",selectable:!0,width:e.style.originalSize.width,height:e.style.originalSize.height}})),m(function processHrefs(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[],o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(e,t)}}(e))){n&&(e=n);var r=0,F=function(){};return{s:F,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:F}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw o}}}}(e);try{for(o.s();!(t=o.n()).done;){var i=t.value;if(i.href){var s=n.length>0?n[0]:"",u="".concat(s,"-").concat(i.id);r.push({id:u,type:"bravoPageEdge",source:s,target:i.href,markerEnd:{type:c.QZ.ArrowClosed,width:20,height:20,color:"#1F85FF"},style:{strokeWidth:4,stroke:"#1F85FF"}})}if(i.children){var l=0===n.length?[i.id]:(0,a.Z)(n);r.push.apply(r,(0,a.Z)(processHrefs(i.children,l)))}}}catch(e){o.e(e)}finally{o.f()}for(var d=[],f={},p=0;p<r.length;p++){var h=r[p];f[h.id]||(d.push(h),f[h.id]=!0)}return d}(_))},[_]),(0,r.useEffect)(function(){m(function(e){return e.map(function(e){return null!==P&&(e.source===P||e.target===P)||null==P?_objectSpread(_objectSpread({},e),{},{hidden:!1}):_objectSpread(_objectSpread({},e),{},{hidden:!0})})})},[P]),(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(c.x$,{nodes:p,edges:v,onNodesChange:y,onEdgesChange:j,onNodeClick:function(e,t){k(t.id)},onPaneClick:function(){k(null)},nodeTypes:d,edgeTypes:f,onConnect:w,fitView:!0,attributionPosition:"bottom-left",nodesDraggable:!0,panOnScroll:!0,zoomOnPinch:!0,minZoom:.1,connectionMode:c.jD.Loose})})},p=n(59671),h=n(51266),y=n(60364),g=(0,h.Q)(function(){return(0,r.useEffect)(function(){(0,y.ZP)().track("app.nodes.viewed")}
1,[]),(0,u.jsx)(l.a9,{children:(0,u.jsxs)(p.Z,{title:"App",theme:"dark",usePadding:!1,className:"h-screen",children:[(0,u.jsx)(o.Z,{}),(0,u.jsx)("div",{className:"flex-grow",children:(0,u.jsx)(apps_TreeView,{})})]})})})},24291:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/apps/[appId]/nodes",function(){return n(22388)}])}},function(e){e.O(0,[8241,9822,804,2654,3896,5517,8519,9235,6694,9774,2888,179],function(){return e(e.s=24291)}),_N_E=e.O()}]);
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.