1 line
17 KiB
JavaScript
1 line
17 KiB
JavaScript
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[526],{7718:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[roadmap]/interactive",function(){return t(1714)}])},4866:function(e,n,t){"use strict";t.d(n,{v:function(){return c}});var r=t(5893),o=t(8527),i=t(8641),a=t(5657);t(7294);function c(){return(0,r.jsxs)(o.xv,{_hover:{textDecoration:"none",color:"blue.700","& .new-badge":{bg:"blue.700"}},as:o.rU,href:i.url.youtube,d:"block",target:"_blank",color:"red.700",fontSize:"sm",mb:"10px",fontWeight:500,onClick:function(){return(0,a.B)({category:"Subscription",action:"Clicked the YouTube banner",label:"YouTube Alert on Roadmap"})},children:[(0,r.jsx)(o.Ct,{transition:"all 300ms",className:"new-badge",mr:"7px",colorScheme:"red",variant:"solid",children:"New"}),(0,r.jsx)(o.xv,{textDecoration:"underline",as:"span",d:["none","inline"],children:"Roadmap topics to be covered on our YouTube Channel"}),(0,r.jsx)(o.xv,{textDecoration:"underline",as:"span",d:["inline","none"],children:"Topic videos being made on YouTube"}),(0,r.jsx)(o.xv,{as:"span",ml:"5px",children:"\xbb"})]})}},1177:function(e,n,t){"use strict";t.d(n,{h:function(){return s}});var r=t(5893),o=t(4866),i=t(8527),a=t(5193),c=t(9876),l=(t(7294),t(1163));function s(e){var n=e.roadmap,t=(0,l.useRouter)().pathname.includes("/interactive");return(0,r.jsx)(i.xu,{pt:["25px","20px","45px"],pb:["20px","15px","30px"],borderBottomWidth:1,mb:"30px",children:(0,r.jsxs)(i.W2,{maxW:"container.md",position:"relative",children:[(0,r.jsx)(o.v,{}),(0,r.jsx)(i.X6,{as:"h1",color:"black",fontSize:["28px","33px","40px"],fontWeight:700,mb:["2px","2px","5px"],children:n.title}),(0,r.jsx)(i.xv,{fontSize:["13px","14px","15px"],children:n.description}),(0,r.jsxs)(i.kC,{justifyContent:"space-between",alignItems:"center",mt:"20px",children:[(0,r.jsxs)(i.Kq,{isInline:!0,children:[(0,r.jsxs)(a.zx,{d:["flex","flex"],as:i.rU,href:"/roadmaps",size:"xs",py:"14px",px:"10px",colorScheme:"teal",variant:"solid",_hover:{textDecoration:"none"},children:["\u2190",(0,r.jsx)(i.xv,{as:"span",d:["none","inline"],ml:"5px",children:"All Roadmaps"})]}),n.pdfUrl&&(0,r.jsx)(a.zx,{as:i.rU,href:n.pdfUrl,target:"_blank",size:"xs",py:"14px",px:"10px",leftIcon:(0,r.jsx)(c._8,{}),colorScheme:"yellow",variant:"solid",_hover:{textDecoration:"none"},children:"Download"}),(0,r.jsx)(a.zx,{as:i.rU,href:"/signup",size:"xs",py:"14px",px:"10px",variant:"solid",colorScheme:"yellow",leftIcon:(0,r.jsx)(c.Km,{}),_hover:{textDecoration:"none"},children:"Subscribe"})]}),"frontend"===n.id&&!t&&(0,r.jsx)(a.zx,{d:["none","flex","flex"],as:i.rU,href:"/frontend/interactive",size:"xs",py:"14px",px:"10px",variant:"solid",_hover:{textDecoration:"none"},colorScheme:"purple",children:"\u2728 Try Beta"})]})]})})}},2903:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSG:function(){return y},default:function(){return g}});var r=t(5893),o=t(8527),i=t(1739),a=t(2438),c=t(1832),l=t(600),s=t(6673),u=t(2348),d=t(202),p=(t(7294),t(9876)),f=t(8641),x=t(5193);function v(e){var n=e.href;return(0,r.jsxs)(o.xu,{my:"30px",children:[(0,r.jsx)(o.iz,{mb:"15px",orientation:"horizontal"}),(0,r.jsx)(o.xv,{lineHeight:"23px",fontWeight:500,fontSize:"14px",color:"gray.500",mb:"10px",children:"This page is a work in progress. Help us by writing a small introduction to the topic and suggesting a few links to read more about this topic."}),(0,r.jsx)(x.zx,{size:"sm",py:"20px",as:o.rU,href:n,target:"_blank",isFullWidth:!0,colorScheme:"purple",_hover:{textDecoration:"none"},children:"Edit this Page"})]})}function h(e){var n=e.roadmap,i=e.group;if(!n.contentPathsFilePath)return null;var a=n.contentPathsFilePath.replace(/^\//,""),c=(t(9280)("./".concat(a))[i]||"").replace(/^\//,""),l=t(9280)("./".concat(c)).default;return(0,r.jsx)(o.xu,{children:(0,r.jsxs)(u.Z,{children:[(0,r.jsx)(l,{}),(0,r.jsx)(v,{href:"".concat(f.url.repoData,"/").concat(c)})]})})}function m(e){var n=e.roadmap,t=e.group.split(":");return(0,r.jsxs)(i.aG,{fontWeight:"medium",fontSize:"sm",separator:(0,r.jsx)(p.XC,{color:"gray.500"}),children:[(0,r.jsx)(i.gN,{children:(0,r.jsx)(i.At,{color:"blue.500",href:"/".concat(n.id),children:n.featuredTitle})}),t.map((function(e,o){return(0,r.jsx)(i.gN,{isCurrentPage:o===t.length-1,children:(0,r.jsx)(i.At,{textTransform:"capitalize",color:"blue.500",href:"/".concat(n.id,"/").concat(t.slice(0,o+1).join(":")),children:e.split("-").join(" ")})},e)}))]})}var y=!0;function g(e){var n,t,i=e.roadmap,u=e.group,p=e.isOutlet;return void 0!==p&&p?(0,r.jsx)(h,{roadmap:i,group:u}):(0,r.jsxs)(o.xu,{bg:"white",minH:"100vh",children:[(0,r.jsx)(a.e,{}),(0,r.jsx)(d.Z,{title:(null===i||void 0===i||null===(n=i.seo)||void 0===n?void 0:n.title)||i.title,description:(null===i||void 0===i||null===(t=i.seo)||void 0===t?void 0:t.description)||i.description,keywords:(null===i||void 0===i?void 0:i.seo.keywords)||[]}),(0,r.jsxs)(o.W2,{my:"60px",maxW:"container.md",position:"relative",children:[(0,r.jsx)(m,{roadmap:i,group:u}),(0,r.jsx)(h,{roadmap:i,group:u})]}),(0,r.jsx)(c.z,{}),(0,r.jsx)(l.q,{}),(0,r.jsx)(s.$,{})]})}},1714:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSG:function(){return N},default:function(){return U}});var r=t(5893),o=t(2730),i=t(7294),a=t(8527),c=t(2438),l=t(1832),s=t(600),u=t(6673),d=t(202),p=t(8520),f=t.n(p);function x(e,n,t){var r=void 0===n?{}:n,o=document.createElementNS("http://www.w3.org/2000/svg",e);for(var i in r)r.hasOwnProperty(i)&&o.setAttribute(i,r[i]);return t&&t.appendChild(o),o}var v=2.7,h={black:["#000"],gray:["#000","#333","#666","#999","#ccc","#ddd","#eee"],white:["#fff"],red:["#cf2a27","#ea9999","#eo6666","#cc0000","#990000","#660000"],orange:["#ff9900","#f9cb9c","#f6b26b","#e69138","#b45f06","#783f04"],yellow:["#ffff00","#ffe599","#ffd966","#f1c232","#bf9000","#7f6000"],green:["#009e0f","#b6d7a8","#93c47d","#6aa84f","#38761d","#274e13"],cyan:["#00ffff","#a2c4c9","#76a5af","#45818e","#134f5c","#0c343d"],blue:["#2b78e4","#9fc5f8","#6fa8dc","#597eaa","#085394","#073763"],purple:["#9900ff","#b4a7d6","#8e7cc3","#674ea7","#351c75","#20124d"],pink:["#ff00ff","#d5a6bd","#c27ba0","#a64d79","#741b47","#4c1130"]};function m(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function g(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(t.push(a.value),!n||t.length!==n);r=!0);}catch(l){o=!0,i=l}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return t}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var b=function(){function e(n,t){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.svgRoot=n,this.fontFamily=t,this.canvasRenderingContext2D=document.createElement("canvas").getContext("2d")}var n,t,r;return n=e,(t=[{key:"render",value:function(e,n){var t=e.typeID;t in this?this[t](e,n):console.log("'".concat(t,"' control type not implemented"))}},{key:"parseColor",value:function(e,n){return void 0===e?"rgb(".concat(n,")"):function(e){var n=e>>8&255,t=255&e;return"rgb(".concat(e>>16&255,",").concat(n,",").concat(t,")")}(e)}},{key:"parseFontProperties",value:function(e){var n,t,r;return{style:(null===(n=e.properties)||void 0===n?void 0:n.italic)?"italic":"normal",weight:(null===(t=e.properties)||void 0===t?void 0:t.bold)?"bold":"normal",size:(null===(r=e.properties)||void 0===r?void 0:r.size)?e.properties.size+"px":"13px",family:this.fontFamily}}},{key:"measureText",value:function(e,n){return this.canvasRenderingContext2D.font=n,this.canvasRenderingContext2D.measureText(e)}},{key:"drawRectangle",value:function(e,n){var t,r,o,i,a,c;x("rect",{x:parseInt(e.x)+1.35,y:parseInt(e.y)+1.35,width:parseInt(null!==(i=e.w)&&void 0!==i?i:e.measuredW)-v,height:parseInt(null!==(a=e.h)&&void 0!==a?a:e.measuredH)-v,rx:2,fill:this.parseColor(null===(t=e.properties)||void 0===t?void 0:t.color,"255,255,255"),"fill-opacity":null!==(c=null===(r=e.properties)||void 0===r?void 0:r.backgroundAlpha)&&void 0!==c?c:1,stroke:this.parseColor(null===(o=e.properties)||void 0===o?void 0:o.borderColor,"0,0,0"),"stroke-width":v},n)}},{key:"addText",value:function(e,n,t,r){var o,i,a=null!==(o=e.properties.text)&&void 0!==o?o:"",c=parseInt(e.x),l=parseInt(e.y),s=this.parseFontProperties(e),u=this.measureText(a,"".concat(s.style," ").concat(s.weight," ").concat(s.size," ").concat(s.family)),d=x("text",{x:"center"===r?c+(null!==(i=e.w)&&void 0!==i?i:e.measuredW)/2-u.width/2:c,y:l+e.measuredH/2+u.actualBoundingBoxAscent/2,fill:t,"font-style":s.style,"font-weight":s.weight,"font-size":s.size},n);a.includes("{color:")?a.split(/{color:|{color}/).forEach((function(e){if(e.includes("}")){var n=g(e.split("}"),2),t=n[0],r=n[1];if(!t.startsWith("#")){var o=parseInt(t.slice(-1));t=isNaN(o)?h[t][0]:h[t][o]}x("tspan",{fill:t},d).textContent=r}else x("tspan",{},d).textContent=e})):x("tspan",{},d).textContent=a}},{key:"TextArea",value:function(e,n){this.drawRectangle(e,n)}},{key:"Canvas",value:function(e,n){this.drawRectangle(e,n)}},{key:"Label",value:function(e,n){var t;this.addText(e,n,this.parseColor(null===(t=e.properties)||void 0===t?void 0:t.color,"0,0,0"),"left")}},{key:"TextInput",value:function(e,n){var t;this.drawRectangle(e,n),this.addText(e,n,this.parseColor(null===(t=e.properties)||void 0===t?void 0:t.textColor,"0,0,0"),"center")}},{key:"Arrow",value:function(e,n){var t,r,o,i,a=parseInt(e.x),c=parseInt(e.y),l=e.properties,s=l.p0,u=l.p1,d=l.p2;"dotted"===(null===(t=e.properties)||void 0===t?void 0:t.stroke)?i="0.8 12":"dashed"===(null===(r=e.properties)||void 0===r?void 0:r.stroke)&&(i="28 46");var p=(d.x-s.x)*u.x,f=(d.y-s.y)*u.x;x("path",{d:"M".concat(a+s.x," ").concat(c+s.y,"Q").concat(a+s.x+p+f*u.y*3.6," ").concat(c+s.y+f+-p*u.y*3.6," ").concat(a+d.x," ").concat(c+d.y),fill:"none",stroke:this.parseColor(null===(o=e.properties)||void 0===o?void 0:o.color,"0,0,0"),"stroke-width":4,"stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":i},n)}},{key:"Icon",value:function(e,n){var t,r=parseInt(e.x),o=parseInt(e.y),i=10;x("circle",{cx:r+i,cy:o+i,r:i,fill:this.parseColor(null===(t=e.properties)||void 0===t?void 0:t.color,"0,0,0")},n),"check-circle"===e.properties.icon.ID&&x("path",{d:"M".concat(r+4.5," ").concat(o+i,"L").concat(r+8.5," ").concat(o+i+4," ").concat(r+15," ").concat(o+i-2.5),fill:"none",stroke:"#fff","stroke-width":3.5,"stroke-linecap":"round","stroke-linejoin":"round"},n)}},{key:"HRule",value:function(e,n){var t,r,o,i,a,c=parseInt(e.x),l=parseInt(e.y);"dotted"===(null===(t=e.properties)||void 0===t?void 0:t.stroke)?i="0.8, 8":"dashed"===(null===(r=e.properties)||void 0===r?void 0:r.stroke)&&(i="18, 30"),x("path",{d:"M".concat(c," ").concat(l,"L").concat(c+parseInt(null!==(a=e.w)&&void 0!==a?a:e.measuredW)," ").concat(l),fill:"none",stroke:this.parseColor(null===(o=e.properties)||void 0===o?void 0:o.color,"0,0,0"),"stroke-width":v,"stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":i},n)}},{key:"__group__",value:function(e,n){var t,r=this,o=null===e||void 0===e||null===(t=e.properties)||void 0===t?void 0:t.controlName,i=x("g",function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){y(e,n,t[n])}))}return e}({},o?{class:"clickable-group","data-group-id":o}:{}),n);e.children.controls.control.sort((function(e,n){return e.zOrder-n.zOrder})).forEach((function(n){n.x=parseInt(n.x,10)+parseInt(e.x,10),n.y=parseInt(n.y,10)+parseInt(e.y,10),r.render(n,i)}))}}])&&m(n.prototype,t),r&&m(n,r),e}();function w(e,n,t,r,o,i,a){try{var c=e[i](a),l=c.value}catch(s){return void t(s)}c.done?n(l):Promise.resolve(l).then(r,o)}function j(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var i=e.apply(n,t);function a(e){w(i,r,o,a,c,"next",e)}function c(e){w(i,r,o,a,c,"throw",e)}a(void 0)}))}}function k(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function C(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){k(e,n,t[n])}))}return e}function z(){return(z=j(f().mark((function e(n,t){var r,o,i,a,c,l,s,u,d;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=C({padding:5,fontFamily:"balsamiq",fontURL:"/fonts/balsamiq.woff2"},r=void 0===t?{}:t)).fontURL){e.next=7;break}return o=new FontFace(r.fontFamily,"url(".concat(r.fontURL,")")),e.next=6,o.load();case 6:document.fonts.add(o);case 7:return i=n.mockup,a=i.measuredW-i.mockupW-r.padding,c=i.measuredH-i.mockupH-r.padding,l=parseInt(i.mockupW)+2*r.padding,s=parseInt(i.mockupH)+2*r.padding,u=x("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"".concat(a," ").concat(c," ").concat(l," ").concat(s),style:"font-family: balsamiq"}),d=new b(u,r.fontFamily),i.controls.control.sort((function(e,n){return e.zOrder-n.zOrder})).forEach((function(e){d.render(e,u)})),e.abrupt("return",u);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var _=t(1177),I=t(4746),S=t(2779),O=t(2903);function W(e){var n=e.roadmap,t=e.groupId,o=e.onClose,i=void 0===o?function(){return null}:o;return t?(0,r.jsxs)(a.xu,{zIndex:99999,pos:"relative",children:[(0,r.jsx)(a.xu,{onClick:i,pos:"fixed",top:0,left:0,right:0,bottom:0,bg:"black",opacity:.4}),(0,r.jsx)(S.Z,{allowPinchZoom:!0,children:(0,r.jsxs)(a.xu,{p:"0px 30px 30px",position:"fixed",w:["100%","60%","40%"],bg:"white",top:0,right:0,bottom:0,borderLeftWidth:"1px",overflowY:"scroll",children:[(0,r.jsx)(I.P,{onClick:i,pos:"absolute",top:"20px",right:"20px",zIndex:1}),(0,r.jsx)(O.default,{isOutlet:!0,roadmap:n,group:t})]})})]}):null}var P=t(8641);function T(e){var n=e.roadmap;return(0,r.jsxs)(a.W2,{bg:"red.600",maxW:"container.md",position:"relative",mt:"50px",p:"20px",rounded:"5px",color:"white",children:[(0,r.jsx)(a.X6,{mb:"4px",size:"md",children:"Oops! There's an error"}),(0,r.jsxs)(a.xv,{children:["Try refreshing or ",(0,r.jsx)(a.rU,{target:"_blank",fontWeight:700,textDecoration:"underline",fontSize:"14px",href:P.url.issue,children:"report a bug"})," and use the ",(0,r.jsx)(a.rU,{fontWeight:700,textDecoration:"underline",href:"/".concat(n.id),children:"non-interactive version"})]})]})}var E=t(9609);function D(){return(0,r.jsx)(a.W2,{maxW:"container.md",position:"relative",mt:"60px",textAlign:"center",children:(0,r.jsx)(E.$,{thickness:"7px",speed:"0.65s",emptyColor:"gray.200",color:"gray.500",size:"xl"})})}function R(e){var n=e.roadmap,t=(0,o.ib)(),c=t.loading,l=t.error,s=t.get,u=(0,i.useRef)(null),d=(0,i.useState)(!0),p=d[0],f=d[1],x=(0,i.useState)(null),v=x[0],h=x[1],m=(0,i.useState)(""),y=m[0],g=m[1],b=(0,i.useState)(!1),w=b[0],j=b[1];return(0,i.useEffect)((function(){s(n.jsonUrl).then((function(e){h(e)})).catch((function(e){console.error(e),j(!0)}))}),[s,n.id,n.jsonUrl]),(0,i.useEffect)((function(){var e=function(e){"escape"===e.key.toLowerCase()&&g("")},n=function(e){var n,t,r=null===(n=null===e||void 0===e?void 0:e.target)||void 0===n?void 0:n.closest("g"),o=null===r||void 0===r||null===(t=r.dataset)||void 0===t?void 0:t.groupId;r&&o&&(o.startsWith("ext_link:")?window.open("https://".concat(o.replace("ext_link:",""))):g(o.replace(/^\d+-/,"")))};return window.addEventListener("keydown",e),window.addEventListener("click",n),function(){window.removeEventListener("keydown",e),window.removeEventListener("click",n)}}),[]),(0,i.useEffect)((function(){v&&(f(!0),function(e){return z.apply(this,arguments)}(v).then((function(e){var n=u.current;n&&(n.firstChild&&n.removeChild(n.firstChild),n.appendChild(e))})).catch((function(e){j(!0)})).finally((function(){f(!1)})))}),[v]),l||w?(0,r.jsx)(T,{roadmap:n}):(0,r.jsxs)(a.W2,{maxW:"container.lg",position:"relative",children:[(c||p)&&(0,r.jsx)(D,{}),(0,r.jsx)(W,{roadmap:n,groupId:y,onClose:function(){return g("")}}),(0,r.jsx)("div",{ref:u})]})}var N=!0;function U(e){var n,t,o=e.roadmap;return(0,r.jsxs)(a.xu,{bg:"white",minH:"100vh",children:[(0,r.jsx)(c.e,{}),(0,r.jsx)(d.Z,{title:(null===o||void 0===o||null===(n=o.seo)||void 0===n?void 0:n.title)||o.title,description:(null===o||void 0===o||null===(t=o.seo)||void 0===t?void 0:t.description)||o.description,keywords:(null===o||void 0===o?void 0:o.seo.keywords)||[]}),(0,r.jsxs)(a.xu,{mb:"60px",children:[(0,r.jsx)(_.h,{roadmap:o}),(0,r.jsx)(R,{roadmap:o})]}),(0,r.jsx)(l.z,{}),(0,r.jsx)(s.q,{}),(0,r.jsx)(u.$,{})]})}}},function(e){e.O(0,[760,22,720,515,122,70,636,280,774,888,179],(function(){return n=7718,e(e.s=n);var n}));var n=e.O();_N_E=n}]); |