PageSourceSearch

https://www.codedex.io/_next/static/chunks/9428-851f310ff99fc55a.js

js codedex.io collected 2026-09-25 14:54:47 UTC 217,413 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9428],{62069:function(e,n,t){var i=t(82729),r=t(85893),o=t(19521);function _templateObject(){let e=(0,i._)(["\n  margin: 0 auto;\n  "," {\n    max-width: 100%;\n  }\n  "," {\n    max-width: 85vw;\n  }\n  "," {\n    max-width: 1152px;\n  }\n"]);return _templateObject=function(){return e},e}let a=o.default.div.withConfig({componentId:"sc-b8ad7ba-0"})(_templateObject(),e=>{let{theme:n}=e;return n.breakpoints.xs},e=>{let{theme:n}=e;return n.breakpoints.md},e=>{let{theme:n}=e;return n.breakpoints.lg});n.Z=function(e){let{children:n,className:t}=e;return(0,r.jsx)("div",{className:"outer-app-container-div",children:(0,r.jsx)(a,{className:t,children:n})})}},17596:function(e,n,t){var i=t(82729),r=t(85893),o=t(19521),a=t(25294),l=t(75659);function _templateObject(){let e=(0,i._)(["\n  display: flex;\n  align-items: center;\n  gap: 11px;\n\n  .default-styles {\n    margin-left: 10px;\n  }\n  .message-container {\n    background: ",";\n\n    .python-typewriter {\n      span {\n        color: ",";\n\n        text-shadow: 0 2px 0\n          ",";\n      }\n    }\n  }\n"]);return _templateObject=function(){return e},e}let s=o.default.div.withConfig({componentId:"sc-9380b86d-0"})(_templateObject(),e=>{let{theme:n,lightModeOnly:t}=e;return t?n.colors.palette.grey["100"]:"dark"==n.mode?n.colors.palette.grey["800"]:n.colors.palette.grey["100"]},e=>{let{theme:n,lightModeOnly:t}=e;return t?n.colors.palette.grey["950"]:"dark"==n.mode?n.colors.palette.grey["50"]:n.colors.palette.grey["950"]},e=>{let{theme:n,lightModeOnly:t}=e;return t?n.colors.palette.grey["200"]:"dark"==n.mode?n.colors.palette.grey["700"]:n.colors.palette.grey["200"]});n.Z=function(e){let{text:n,lightModeOnly:t=!1,height:i="60px",typingSpeed:o=25,verticle:c=!1,setAction:d=()=>{}}=e;return(0,r.jsxs)(s,{lightModeOnly:t,className:"computer-message",children:["lumi"===e.avatarType?(0,r.jsx)(l.ZP,{avatarType:"lumi",state:e.state}):(0,r.jsx)(l.ZP,{avatarType:"codedex",state:e.state}),(0,r.jsx)(a.Z,{message:n,lightModeOnly:t,height:i,typingSpeed:o,setAction:d,firstScene:c})]})}},52317:function(e,n,t){var i=t(82729),r=t(85893),o=t(19521),a=t(85673),l=t(73845);function _templateObject(){let e=(0,i._)(["\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  padding: 8px 12px;\n\n  color: ",";\n  font-size: 16px;\n  font-style: normal;\n  font-weight: 500;\n  line-height: 150%;\n  border-radius: 4px;\n  text-decoration: none;\n\n  svg {\n    path {\n      fill: ",";\n    }\n  }\n\n  ","\n\n  :hover {\n    color: ",";\n    background-color: ",";\n\n    svg {\n      path {\n        fill: ",";\n      }\n    }\n  }\n"]);return _templateObject=function(){return e},e}let s=o.default.div.withConfig({componentId:"sc-970adbc9-0"})(_templateObject(),e=>{let{theme:n}=e;return n.colors.text.primary},e=>{let{theme:n}=e;return n.colors.text.tertiary},e=>{let{theme:n,$isActive:t}=e;return t&&"\n    color: ".concat(n.colors.text.accent.blue,";\n    background-color: ").concat(n.colors.background.grey.secondary,";\n\n    svg {\n      path {\n        fill: ").concat(n.colors.text.accent.blue,";\n      }\n    }\n  ")},e=>{let{theme:n}=e;return n.colors.text.accent.blue},e=>{let{theme:n}=e;return n.colors.background.grey.secondary},e=>{let{theme:n}=e;return n.colors.text.accent.blue});n.Z=function(e){let{icon:n,copy:t,link:i="",toastCopy:o="Link copied",action:c=null,className:d="",isActive:u=!1}=e,p=(0,l.T)();return(0,r.jsxs)(s,{$isActive:u,onClick:e=>c?c(e):void(i||(e.preventDefault(),p((0,a.fz)({message:o})),navigator.clipboard.writeText(window.location.href).then(()=>{console.log("Link copied to clipboard!")}).catch(e=>{console.error("Failed to copy link:",e)}))),className:"nes-pointer ".concat(d),children:[n,t]})}},17717:function(e,n,t){var i=t(82729),r=t(85893),o=t(19521),a=t(3649);function _templateObject(){let e=(0,i._)(["\n  background-color: ",";\n\n  .inner-pixel-border-button-wrapper {\n    height: calc(100% - 4px);\n    background-color: ",";\n    padding: 16px;\n\n    :hover {\n      background-color: ",";\n    }\n  }\n"]);
1return _templateObject=function(){return e},e}let l=(0,o.default)(a.Z).withConfig({componentId:"sc-e6fc7e98-0"})(_templateObject(),e=>{let{theme:n}=e;return n.colors.background.grey.tertiary},e=>{let{theme:n}=e;return n.colors.background.grey.primary},e=>{let{theme:n}=e;return n.colors.background.grey.secondary});n.Z=function(e){let{height:n,onClick:t,children:i}=e;return(0,r.jsx)(l,{style:{height:n},onClick:t,className:"large-pixel-button-wrapper",children:(0,r.jsx)(a.Z,{className:"inner-pixel-border-button-wrapper nes-pointer",children:i})})}},5135:function(e,n,t){var i=t(82729),r=t(85893),o=t(19521);function _templateObject(){let e=(0,i._)(['\n  display: flex;\n  align-items: center;\n  font-family: "Mulish", sans-serif;\n  gap: 14px;\n  width: 100%;\n\n  span {\n    flex: 1;\n    height: 2px;\n    background-color: ',";\n  }\n\n  p {\n    margin: 0px;\n    color: ",";\n    font-size: 12px;\n    font-style: normal;\n    font-weight: 600;\n    line-height: 150%;\n    letter-spacing: 1.68px;\n    text-transform: uppercase;\n  }\n"]);return _templateObject=function(){return e},e}let a=o.default.div.withConfig({componentId:"sc-27c067e-0"})(_templateObject(),e=>{let{theme:n}=e;return n.colors.border.grey.light},e=>{let{theme:n}=e;return n.colors.text.tertiary});n.Z=function(e){let{text:n}=e;return(0,r.jsxs)(a,{children:[(0,r.jsx)("span",{className:"line"}),(0,r.jsx)("p",{children:n}),(0,r.jsx)("span",{className:"line"})]})}},66081:function(e,n,t){var i=t(82729),r=t(85893),o=t(19521),a=t(72502),l=t(45540),s=t(73857),c=t(73935),d=t(43754);function _templateObject(){let e=(0,i._)(["\n  .build-remix-confirmation {\n    width: 510px;\n    height: fit-content;\n\n    h3 {\n      color: ",";\n      text-align: center;\n      font-size: 24px;\n      font-weight: 700;\n      line-height: 150%;\n    }\n\n    p {\n      margin-top: 1rem;\n      color: ",";\n      text-align: center;\n      font-size: 16px;\n      font-style: normal;\n      font-weight: 500;\n      line-height: 150%;\n    }\n\n    .btn-wrapper {\n      margin-top: 24px;\n      display: flex;\n      align-items: center;\n      gap: 8px;\n\n      button {\n        flex: 1;\n      }\n    }\n  }\n"]);return _templateObject=function(){return e},e}let u=(0,o.default)(a.Z).withConfig({componentId:"sc-b39369ea-0"})(_templateObject(),e=>{let{theme:n}=e;return n.colors.text.primary},e=>{let{theme:n}=e;return n.colors.text.primary});n.Z=function(e){let{buildId:n,buildTitle:t,onClose:i}=e,{remix:o,remixing:a}=(0,d.a)();return"undefined"==typeof document?null:(0,c.createPortal)((0,r.jsx)(u,{setShowModel:i,children:(0,r.jsxs)(l.Z,{className:"build-remix-confirmation",iconAction:i,children:[(0,r.jsx)("h3",{children:"Remix this build?"}),(0,r.jsx)("p",{children:"Create an editable copy of this build. Changes you make won't affect the original."}),(0,r.jsxs)("div",{className:"btn-wrapper",children:[(0,r.jsx)(s.Z,{variant:"subtle",onClick:i,disabled:a,children:"Cancel"}),(0,r.jsx)(s.Z,{variant:"yellow",onClick:async()=>{await o({buildId:n,title:t})&&i()},disabled:a,children:a?"Remixing...":"Remix"})]})]})}),document.body)}},34787:function(e,n,t){var i=t(82729),r=t(85893),o=t(19521),a=t(45540),l=t(73857);function _templateObject(){let e=(0,i._)(["\n  z-index: 9999;\n  height: 100vh;\n  width: 100vw;\n  position: fixed;\n  top: 0;\n  left: 0;\n  background: ",';\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  font-family: "Mulish", sans-serif;\n  pointer-events: auto;\n\n  .opc-delete-action {\n    position: relative;\n    height: fit-content;\n    max-height: calc(100vh - 2rem);\n    overflow: auto;\n    max-width: 600px;\n    width: 500px;\n    display: flex;\n    flex-direction: column;\n    padding: 3.5rem 16px 16px;\n    align-items: center;\n    gap: 3rem;\n    color: ',";\n    text-align: center;\n\n    .cross-icon {\n      position: absolute;\n      top: 1rem;\n      right: 1rem;\n    }\n\n    h2 {\n      margin: 0;\n      font-size: 24px;\n      font-weight: 700;\n    }\n\n    p {\n      margin: 1rem 0 2rem;\n      font-weight: 500;\n      line-height: 1.5;\n    }\n\n    .btn-container {\n      display: flex;\n      align-items: center;\n      gap: 16px;\n      width: 100%;\n\n      button {\n        flex: 1;\n      }\n    }\n  }\n"]);
1return _templateObject=function(){return e},e}let s=o.default.div.withConfig({componentId:"sc-77e1ba8f-0"})(_templateObject(),e=>{let{theme:n}=e;return n.colors.background.grey.overlay},e=>{let{theme:n}=e;return n.colors.text.primary});n.Z=function(e){let{label:n="Delete Post",copy:t="Are your sure you want to delete this post? This can’t be undone and the post will be removed from your profile.",setShowDeleteForm:i,handleDeleteFunction:o}=e;return(0,r.jsx)(s,{onMouseDown:e=>e.stopPropagation(),onClick:e=>{e.target===e.currentTarget&&i(!1)},children:(0,r.jsxs)(a.Z,{iconAction:()=>i(!1),className:"opc-delete-action",children:[(0,r.jsx)("h2",{children:n}),(0,r.jsx)("p",{children:t}),(0,r.jsxs)("div",{className:"btn-container",children:[(0,r.jsx)(l.Z,{variant:"subtle",onClick:()=>i(!1),children:"Cancel"}),(0,r.jsx)(l.Z,{variant:"red",onClick:()=>{o()},children:"Delete"})]})]})})}},86247:function(e,n,t){var i=t(85893);n.Z=function(e){let{color:n="#64748B",...t}=e;return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",...t,children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 3.5H11V5.5H3V17.5H11V5.5H13V17.5H21V5.5H13V3.5H21H23V5.5V17.5V19.5H21H13V21.5H11V19.5H3H1V17.5V5.5V3.5H3ZM19 10.5H15V12.5H19V10.5ZM15 7.5H19V9.5H15V7.5ZM17 13.5H15V15.5H17V13.5Z",fill:n})})}},61719:function(e,n,t){var i=t(85893);n.Z=function(e){let{...n}=e;return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",...n,children:(0,i.jsx)("path",{d:"M22.667 29.333H17.333V26.667H20V10.667H6.66699V26.667H9.33301V29.333H4V8H22.667V29.333ZM12 26.667H9.33301V24H12V26.667ZM17.333 26.667H14.667V24H17.333V26.667ZM14.667 24H12V21.333H14.667V24ZM28 2.66699V24H25.333V5.33301H9.33301V2.66699H28Z",fill:"#64748B"})})}},53835:function(e,n,t){var i=t(85893),r=t(67294),o=t(19521);n.Z=function(e){var n,t;let{...a}=e,l=(0,r.useContext)(o.ThemeContext),s=(null==l?void 0:null===(t=l.colors)||void 0===t?void 0:null===(n=t.text)||void 0===n?void 0:n.tertiary)||"#64748B";return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...a,children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 2H13V4H21V18H11V16H5V22H3V2ZM5 14H13V16H19V6H11V4H5V14Z",fill:s})})}},9098:function(e,n,t){var i=t(85893);n.Z=function(e){let{className:n="",height:t=24,width:r=24,...o}=e;return(0,i.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,width:r,height:t,...o,children:[(0,i.jsx)("g",{"clip-path":"url(#clip0_64_1628)",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 6H11V8H4V16H11V18H4H2V16V8V6H4ZM20 6H13V8H20V16H13V18H20H22V16V8V6H20ZM17 11H7V13H17V11Z",fill:"white"})}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"clip0_64_1628",children:(0,i.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]})}},50823:function(e,n,t){var i=t(85893);n.Z=function(e){let{width:n=15,height:t=19,className:r="",...o}=e;return(0,i.jsx)("svg",{width:n,height:t,viewBox:"0 0 15 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,...o,children:(0,i.jsx)("path",{d:"M10 18.334H8.33301V16.667H10V18.334ZM8.33301 13.334H13.333V15H8.33301V16.667H6.66699V15H5V13.334H6.66699V11.667H8.33301V13.334ZM3.33301 15H1.66699V13.334H3.33301V15ZM1.66699 13.334H0V5H1.66699V13.334ZM15 5V13.334H13.333V5H15ZM10 11.667H8.33301V10H10V11.667ZM6.66699 8.33398H5V6.66699H6.66699V8.33398ZM8.33301 3.33398H10V5H8.33301V6.66699H6.66699V5H1.66699V3.33398H6.66699V1.66699H8.33301V3.33398ZM13.333 5H11.667V3.33398H13.333V5ZM6.66699 1.66699H5V0H6.66699V1.66699Z",fill:o.color||"currentColor"})})}},79646:function(e,n,t){var i=t(85893);n.Z=function(e){let{...n}=e;return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...n,children:(0,i.jsx)("path",{d:"M8 5H4V11H12V13H4V19H8V21H2V3H8V5ZM12 19H8V17H12V19ZM16 17H12V15H16V17ZM20 15H16V13H20V15ZM22 13H20V11H22V13ZM20 11H16V9H20V11ZM16 9H12V7H16V9ZM12 7H8V5H12V7Z",fill:"#94A3B8"})})}},86807:function(e,n,t){var i=t(85893);n.Z=function(e){let{className:n="",...t}=e;return(0,i.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,...t,children:[(0,i.jsx)("g",{"clip-path":"url(#clip0_175_3440)",children:(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.33317 3.3335H8.33317V5.8335H18.3332V7.50016H8.33317V10.0002H3.33317V7.50016H1.6665V5.8335H3.33317V3.3335ZM4.99984 5.00016V8.3335H6.6665V5.00016H4.99984ZM11.6665 10.0002H16.6665V12.5002H18.3332V14.1668H16.6665V16.6668H11.6665V14.1668H1.6665V12.5002H11.6665V10.0002ZM13.3332 11.6668V15.0002H14.9998V11.6668H13.3332Z",fill:t.color||"currentColor"})}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"clip0_175_3440",children:(0,i.jsx)("rect",{width:"20",height:"20",fill:"white"})})})]})}},36138:function(e,n,t){var i=t(85893);n.Z=function(e){let{width:n=20,height:t=20,color:r="#020617",...o}=e;return(0,i.jsx)("svg",{width:n,height:t,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.6668 4.16699H10.0002V7.50033H5.00016V9.16699H3.3335V14.167H5.00016V12.5003H10.0002V15.8337H11.6668V14.167H13.3335V12.5003H15.0002V10.8337H16.6668V9.16699H15.0002V7.50033H13.3335V5.83366H11.6668V4.16699Z",fill:r})})}},89528:function(e,n,t){var i=t(85893);n.Z=function(e){let{fill:n="#CBD5E1",...t}=e;return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"16",viewBox:"0 0 18 16",fill:"none",children:(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 0H18V16H10V8H16V4H8V16H0V8H6V0ZM6 10H2V14H6V10ZM16 10H12V14H16V10Z",fill:"#94A3B8"})})}},58444:function(e,n,t){var i=t(85893);n.Z=function(e){let{fill:n="#CBD5E1",...t}=e;return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"14",viewBox:"0 0 20 14",fill:"none",children:(0,i.jsx)("path",{d:"M14 4H16V2H18V0H20V14H18V12H16V10H14V14H0V0H14V4ZM2 12H12V2H2V12Z",fill:"#94A3B8"})})}},82159:function(e,n,t){var i=t(85893);n.Z=function(e){let{...n}=e;return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.3329 1.66699H13.3331V3.33366H13.3329V5.00033H14.9996H16.6663L18.3329 5.00033V6.66699H16.6663V16.667H16.6665V18.3337L16.6663 18.3337H14.9996H4.9998L3.33313 18.3337V16.667V6.66699H1.66626V5.00033L3.33313 5.00033H4.9998H6.66646V3.33366V1.66699H8.33313H11.6663H13.3329ZM11.6663 3.33366H8.33313V5.00033H11.6663V3.33366ZM11.6663 6.66699H8.33313H6.66646L4.9998 6.66699V16.
1667H14.9996V6.66699L13.3329 6.66699H11.6663ZM7.49959 8.33366H9.16626V15.0003H7.49959V8.33366ZM12.4998 8.33366H10.8331V15.0003H12.4998V8.33366Z",fill:"#F43F5E"})})}},78777:function(e,n,t){var i=t(85893);n.Z=function(e){let{...n}=e;return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 2H10V4H8V6H6V8H4V10H2V12H4V22H11V16H13V22H20V12H22V10H20V8H18V6H16V4H14V2ZM14 4V6H16V8H18V10H20V12H18V20H15V14H9V20H6V12H4V10H6V8H8V6H10V4H14Z",fill:"#64748B"})})}},31505:function(e,n,t){var i=t(82729),r=t(85893),o=t(19521);function _templateObject(){let e=(0,i._)(["\n  flex: 1;\n  border-radius: 8px;\n  border: 2px solid ",";\n  padding: 16px;\n  display: flex;\n  gap: 12px;\n  color: ",";\n\n  :hover {\n    background-color: ",";\n  }\n\n  .custom-radio {\n    border-radius: 50%;\n    border: 2px solid ",";\n    width: 26px;\n    height: 26px;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n  }\n\n  &.checked {\n    border-color: ",";\n    background-color: ",";\n\n    .custom-radio {\n      border-color: ",";\n      background-color: ",";\n    }\n  }\n"]);return _templateObject=function(){return e},e}let a=o.default.div.withConfig({componentId:"sc-9da48c68-0"})(_templateObject(),e=>{let{theme:n}=e;return n.colors.border.grey.medium},e=>{let{theme:n}=e;return n.colors.text.primary},e=>{let{theme:n}=e;return n.colors.background.grey.secondary},e=>{let{theme:n}=e;return n.colors.border.grey.medium},e=>{let{theme:n}=e;return n.colors.text.accent.blue},e=>{let{theme:n}=e;return n.colors.background.blue.primary},e=>{let{theme:n}=e;return n.colors.text.accent.blue},e=>{let{theme:n}=e;return n.colors.text.accent.blue});n.Z=function(e){let{copy:n,checked:t,onClick:i}=e;return(0,r.jsxs)(a,{className:"nes-pointer ".concat(t&&"checked"," radio-button"),onClick:i,children:[(0,r.jsx)("div",{className:"custom-radio",children:t&&l}),n]})};let l=(0,r.jsx)("svg",{width:"15",height:"11",viewBox:"0 0 15 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M13.8125 0.40625C14.2188 0.78125 14.2188 1.4375 13.8125 1.8125L5.8125 9.8125C5.4375 10.2188 4.78125 10.2188 4.40625 9.8125L0.40625 5.8125C0 5.4375 0 4.78125 0.40625 4.40625C0.78125 4 1.4375 4 1.8125 4.40625L5.09375 7.6875L12.4062 0.40625C12.7812 0 13.4375 0 13.8125 0.40625Z",fill:"white"})})},26070:function(e,n,t){var i=t(82729),r=t(85893),o=t(19521),a=t(3649),l=t(16877),s=t(34787),c=t(82159),d=t(67294),u=t(73935),p=t(57881),h=t(9473),m=t(609),g=t(50528),f=t(73845);function _templateObject(){let e=(0,i._)(["\n  position: absolute;\n  top: 30px;\n  right: -10px;\n\n  box-shadow: 0 5px 16px 0 ",";\n  border-radius: 12px;\n\n  .wrapper {\n    padding: 10px;\n    background-color: ",";\n    width: 200px;\n    \n    "," {\n      right: 0px;\n      width: 180px;\n    }\n    "," {\n      width: 190px;\n    }\n    "," {\n      width: 200px;\n    }\n\n    .delete {\n      svg {\n        path {\n          fill: #f43f5e;\n        }\n      }\n    }\n  }\n"]);return _templateObject=function(){return e},e}let x=o.default.div.withConfig({componentId:"sc-9291341c-0"})(_templateObject(),e=>{let{theme:n}=e;return n.colors.background.grey.boxshadow},e=>{let{theme:n}=e;return n.colors.background.grey.primary},e=>{let{theme:n}=e;return n.breakpoints.sm},e=>{let{theme:n}=e;return n.breakpoints.lg},e=>{let{theme:n}=e;return n.breakpoints.xl});n.Z=function(){let e=(0,f.T)(),n=(0,h.v9)(m.f8),t=(0,h.v9)(g.AU),[i,o]=(0,d.useState)(!1);async function handleDelete(){try{let i=await (0,p.dT)({uid:n,docId:t,subCollection:"lumiChats"});200===i.status&&e((0,g.JG)(t))}catch(e){console.log(e)}}return(0,r.jsxs)(r.Fragment,{children:[i&&(0,u.createPortal)((0,r.jsx)(s.Z,{setShowDeleteForm:o,handleDeleteFunction:handleDelete,label:"Delete chat",copy:"Are your sure you want to delete this chat? This can’t be undone and the chat will be removed."}),document.body),(0,r.jsx)(x,{children:(0,r.jsx)(a.Z,{className:"wrapper",children:(0,r.jsx)(l.Z,{text:"Delete",type:"delete",svg:(0,r.jsx)(c.Z,{}),onClick:()=>o(!0)})})})]})}},43626:function(e,n,t){var i=t(82729),r=t(85893),o=t(67294),a=t(77493),l=t(96391),s=t(19521),c=t(73857),d=t(79646),u=t(3649),p=t(34736),h=t(47010);
1function _templateObject(){let e=(0,i._)(['\n  width: 100%;\n  /* max-width: 752px; */\n  padding: 18px;\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n  font-family: "Mulish", sans-serif;\n  color: ',";\n  background-color: ",";\n\n  font-size: 16px;\n  font-style: normal;\n  font-weight: 500;\n  line-height: 150%;\n\n  .slate-editor-wrapper {\n    min-height: 24px;\n    max-height: 350px;\n    overflow: auto;\n    .slate-editable {\n      outline: none;\n      /* min-height: 96px; */\n\n      p {\n        margin: 0 0 8px 0;\n        line-height: 1.6;\n        cursor: text;\n\n        &:last-child {\n          margin-bottom: 0;\n        }\n      }\n\n      code {\n        background-color: ",";\n        color: ",';\n        font-family: "Noto Sans Mono", monospace;\n        border-radius: 3px;\n        line-height: 1;\n        font-size: 14px;\n      }\n\n      pre {\n        background-color: ',";\n        padding: 1rem;\n        border-radius: 8px;\n        overflow-x: auto;\n        line-height: 1;\n      }\n\n      span[data-slate-placeholder] {\n        color: "," !important;\n        opacity: 1 !important;\n      }\n    }\n  }\n\n  .toolbar-wrapper {\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n\n    .send-button {\n      width: 44px;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n\n      svg {\n        path {\n          fill: white;\n        }\n      }\n\n      &.disabled svg path,\n      &:disabled svg path {\n        fill: ",";\n      }\n    }\n\n    .tools {\n      display: flex;\n      gap: 8px;\n\n      .tool {\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        width: 32px;\n        height: 32px;\n        cursor: pointer;\n        border-radius: 4px;\n        transition: background 0.2s;\n\n        &:hover {\n          background: ",";\n        }\n\n        &.active {\n          background: ",";\n\n          svg path {\n            fill: #3b82f6;\n          }\n        }\n      }\n    }\n  }\n"]);return _templateObject=function(){return e},e}let m=(0,s.default)(u.Z).withConfig({componentId:"sc-7e0634c0-0"})(_templateObject(),e=>{let{theme:n}=e;return n.colors.text.primary},e=>{let{theme:n}=e;return n.colors.background.grey.secondary},e=>{let{theme:n}=e;return n.colors.background.grey.primary},e=>{let{theme:n}=e;return n.colors.text.secondary},e=>{let{theme:n}=e;return n.colors.background.grey.primary},e=>{let{theme:n}=e;return n.colors.text.tertiary},e=>{let{theme:n}=e;return n.colors.text.primary},e=>{let{theme:n}=e;return n.colors.background.grey.tertiary},e=>{let{theme:n}=e;return n.colors.background.grey.tertiary}),toNodes=e=>(null!=e?e:"").split("\n").map(e=>({type:"paragraph",children:[{text:e}]}));function CodeElement(e){return(0,r.jsx)("pre",{...e.attributes,children:(0,r.jsx)("code",{children:e.children})})}function DefaultElement(e){return(0,r.jsx)("p",{...e.attributes,children:e.children})}function Leaf(e){return(0,r.jsx)("span",{...e.attributes,style:{fontWeight:e.leaf.bold?"bold":"normal",fontStyle:e.leaf.italic?"italic":"normal",textDecoration:e.leaf.underline?"underline":"none"},children:e.children})}n.Z=function(e){let{prefilled:n,sideFunction:t,forTemplateGen:i=!1,placeholder:s="Ask Lumi a question"}=e,{sendMessage:u}=(0,p.M)(),f=(0,o.useMemo)(()=>(0,l.BU)((0,a.Jh)()),[]),[x,b]=(0,o.useState)(!1),v=(0,o.useRef)(null),[w,y]=(0,o.useState)(!1),[H,V]=(0,o.useState)(()=>toNodes(n)),j=(0,o.useCallback)(e=>{a.YR.delete(f,{at:{anchor:f.start([]),focus:f.end([])}}),a.YR.insertNodes(f,e,{at:[0]}),a.YR.removeNodes(f,{at:[e.length]}),a.YR.select(f,f.end([])),V(e)},[f]),k=(0,o.useRef)(n);(0,o.useEffect)(()=>{void 0!==n&&n!==k.current&&(k.current=n,j(toNodes(n)))},[n,j]);let M=(0,o.useCallback)(e=>"code"===e.element.type?(0,r.jsx)(CodeElement,{...e}):(0,r.jsx)(DefaultElement,{...e}),[]),C=(0,o.useCallback)(e=>(0,r.jsx)(Leaf,{...e}),[]),Z=(0,o.useCallback)(e=>{let{selection:n}=f;if(!n)return;let[t]=Array.from(f.nodes({match:e=>"code"===e.type}));if(t){e.preventDefault();let n=e.clipboardData.getData("text/plain");f.insertText(n)}},[f]),_=H.some(e=>e.children.some(e=>e.text.trim())),S=(0,o.useCallback)(()=>H.map(e=>"code"===e.type?"```\n".concat(e.children.map(e=>e.text).join(""),"\n```"):e.children.map(e=>e.text).join("")).join("\n"),[H]),E=(0,o.useCallback)(()=>{j(toNodes(""))},[j]),B=(0,o.useCallback)(async()=>{let e=S().trim();if(e){i&&y(!0);try{i||(u(e),E()),await t(e),y(!1)}catch(e){console.error("Failed to send message:",e),y(!1)}}},[S,u,E,i,t]),T=(0,o.useCallback)(e=>{if("Enter"===e.key){let{selection:n}=f;if(!n)return;let[t]=Array.from(f.nodes({match:e=>"code"===e.type}));if(e.shiftKey||t){e.preventDefault(),f.insertText("\n");return}e.preventDefault(),B()}if("Backspace"===e.key){let{selection:n}=f;if(!n)return;let[t]=Array.from(f.nodes({match:e=>"code"===e.type}));
1if(t){let[n]=t,i=n.children.map(e=>e.text).join("");""===i&&(e.preventDefault(),f.setNodes({type:"paragraph"}))}}},[f,B]);return(0,r.jsxs)(m,{borderColor:x?"14ADFF":null,children:[(0,r.jsx)("div",{className:"slate-editor-wrapper",children:(0,r.jsx)(l.mH,{editor:f,initialValue:H,onChange:V,children:(0,r.jsx)(l.CX,{ref:v,className:"slate-editable",renderElement:M,renderLeaf:C,onKeyDown:T,onPaste:Z,placeholder:s,spellCheck:!0,autoFocus:!0})})}),(0,r.jsxs)("div",{className:"toolbar-wrapper",children:[(0,r.jsx)("div",{className:"tools",children:(0,r.jsx)("div",{className:"tool",onClick:function(){let{selection:e}=f;if(!e)return;let[n]=Array.from(f.nodes({match:e=>"code"===e.type}));n?f.setNodes({type:"paragraph"}):(f.setNodes({type:"code"}),f.insertNode({type:"paragraph",children:[{text:""}]}))},children:g})}),(0,r.jsx)(c.Z,{className:"send-button",size:"small",disabled:!_||w,variant:_?"blue":"subtle",onClick:B,children:w?(0,r.jsx)(h.Z,{color:"#fcfcfc",size:5}):(0,r.jsx)(d.Z,{})})]})]})};let g=(0,r.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M9 4.46875L11 6.46875C11.3125 6.78125 11.3125 7.25 11 7.53125L9 9.53125C8.71875 9.84375 8.25 9.84375 7.96875 9.53125C7.65625 9.25 7.65625 8.78125 7.96875 8.46875L9.4375 7L7.96875 5.53125C7.65625 5.25 7.65625 4.78125 7.96875 4.46875C8.25 4.1875 8.71875 4.1875 9 4.46875ZM4.53125 7L6 8.46875C6.3125 8.78125 6.3125 9.25 6 9.53125C5.71875 9.84375 5.25 9.84375 4.96875 9.53125L2.96875 7.53125C2.65625 7.25 2.65625 6.78125 2.96875 6.46875L4.96875 4.46875C5.25 4.1875 5.71875 4.1875 6 4.46875C6.3125 4.78125 6.3125 5.25 6 5.53125L4.53125 7ZM12 0C13.0938 0 14 0.90625 14 2V12C14 13.125 13.0938 14 12 14H2C0.875 14 0 13.125 0 12L0 2C0 0.90625 0.875 0 2 0H12ZM12 1.5H2C1.71875 1.5 1.5 1.75 1.5 2V12C1.5 12.2812 1.71875 12.5 2 12.5H12C12.25 12.5 12.5 12.2812 12.5 12V2C12.5 1.75 12.25 1.5 12 1.5Z",fill:"#94A3B8"})})},34736:function(e,n,t){t.d(n,{M:function(){return useSendLumiMessage}});var i=t(67294),r=t(73845),o=t(50528),a=t(9473),l=t(609),s=t(27741),chatbot_lumiPrompts=function(e){var n;let{taskType:t,projectsList:i=[],courseList:r=[],singleCourse:o="python"}=e,a={general:{role:"developer",content:'You are a knowledgeable software engineering assistant helping developers with programming tasks, code review, debugging, and technical problem-solving.\n\n### Core Responsibilities\n- Provide accurate, well-explained answers to programming questions\n- Assist with code review, debugging, and optimization\n- Explain technical concepts clearly and thoroughly\n- Suggest best practices and industry standards\n- Help troubleshoot errors and implementation issues\n\n### Response Guidelines\n\n**Code Review and Feedback:**\n- Analyze code systematically and professionally\n- Identify strengths and positive aspects first\n- Point out issues, bugs, or potential improvements\n- Explain the reasoning behind suggestions\n- Provide context on best practices and design patterns\n- Offer alternatives when applicable\n\n**Explanations:**\n- Be clear, precise, and technically accurate\n- Use examples and code snippets to illustrate concepts\n- Break down complex topics into digestible parts\n- Explain both the "how" and the "why"\n- Reference official documentation when relevant\n\n**Response Style:**\n- **Default to concise, focused responses** - be direct and efficient\n- **Expand when necessary** - provide comprehensive explanations for:\n  - Complex algorithms or design patterns\n  - Debugging multi-step issues\n  - Architectural decisions\n  - Fundamental concepts that require thorough understanding\n- Maintain a professional yet approachable tone\n- Use emojis sparingly where they add clarity or emphasis (optional, not required)\n\n**Problem-Solving Approach:**\n- Understand the full context before providing solutions\n- Ask clarifying questions when requirements are ambiguous\n- Provide step-by-step guidance for complex problems\n- Suggest multiple approaches when applicable\n- Encourage good practices: testing, documentation, error handling\n\n### Code Feedback Structure\nWhen reviewing code, organize feedback as:\n1. **Strengths** - Acknowledge what works well\
1n2. **Issues** - Identify bugs, errors, or problematic patterns with explanations\n3. **Improvements** - Suggest optimizations, refactoring, or better approaches\n4. **Next Steps** - Recommend follow-up actions or learning opportunities\n\n### Boundaries\n- Stay focused on programming, software development, and related technical topics\n- For questions outside this scope, politely redirect to programming-related assistance\n- Decline requests that involve generating malicious code or bypassing security measures\n\n### Technical Depth\n- Adapt complexity to the user\'s apparent skill level\n- Provide production-ready solutions when possible\n- Include error handling and edge case considerations\n- Reference relevant language features, libraries, or frameworks\n- Stay current with modern development practices\n\n### Platform Course References\n**IMPORTANT:** When discussing topics that would benefit from structured learning, check if we have relevant courses. If there are matches:\n- **Mention these at the END of your response**\n- Only suggest courses from our platform\n- List matching courses with their exact slugs\n- Frame it as: "If you\'d like to learn more about this topic, we have courses that cover it!"\n\n**Matching Guidelines:**\n- Match based on technology, language, or concept\n- Be specific - only suggest courses directly relevant to the current discussion\n- Consider the user\'s current knowledge gap\n\n**Examples of GOOD matches:**\n- Discussion about React hooks → "learn-react" or "react-advanced-concepts" ✓\n- Python debugging help → "python-fundamentals" or "python-intermediate" ✓\n- API design questions → "build-rest-apis" or "nodejs-backend-development" ✓\n\n**Examples of BAD matches (DO NOT suggest):**\n- Brief HTML question → Don\'t suggest entire web development bootcamp (too broad)\n- Advanced topic → Don\'t suggest beginner course (wrong level)\n\n### Available Platform Courses\nHere are the courses available on our platform:\n'.concat(r.map(e=>"- ".concat(e)).join("\n"),"\n")},explanation:{role:"developer",content:"You are an expert technical educator specializing in explaining programming concepts, technologies, and software development topics.\n\n### Core Responsibilities\n- Break down complex technical concepts into clear, understandable explanations\n- Adapt explanations to the user's apparent knowledge level\n- Use analogies, examples, and visual descriptions to illustrate abstract concepts\n- Provide context on when and why concepts are used in real-world development\n\n### Explanation Structure\n1. **Simple Overview** - Start with a high-level summary in plain language\n2. **Core Concepts** 
1- Break down the fundamental components\n3. **Practical Examples** - Show real code examples that demonstrate the concept\n4. **Real-World Context** - Explain where and why this is used in actual development\n5. **Common Pitfalls** - Highlight typical misunderstandings or mistakes\n6. **Further Learning** - Suggest related topics or next steps\n\n### Response Style\n- Start simple, then progressively add depth\n- Use code examples liberally to illustrate points\n- Draw comparisons to familiar concepts when helpful\n- Include visual representations (ASCII diagrams, structure layouts) when applicable\n- Encourage questions and check understanding\n\n### Topics to Cover\n- Programming languages and syntax\n- Data structures and algorithms\n- Design patterns and architectures\n- Frameworks, libraries, and tools\n- Software engineering principles\n- Development workflows and best practices\n\n**Goal:** Make any technical topic accessible and understandable, regardless of complexity."},"bug-finder":{role:"developer",content:"You are an expert debugging assistant specializing in identifying, analyzing, and resolving code issues.\n\n### Core Responsibilities\n- Systematically analyze code to identify bugs and errors\n- Explain the root cause of issues clearly\n- Provide working fixes with explanations\n- Teach debugging techniques and problem-solving strategies\n- Help prevent similar issues in the future\n\n### Debugging Approach\n1. **Initial Analysis**\n   - Carefully read the code and error messages\n   - Identify the type of issue (syntax, logic, runtime, etc.)\n   - Ask clarifying questions about expected vs actual behavior\n\n2. **Root Cause Investigation**\n   - Trace the execution flow\n   - Identify where things go wrong\n   - Explain WHY the bug occurs, not just WHAT is wrong\n\n3. **Solution Delivery**\n   - Provide corrected code with clear comments\n   - Explain the changes made and why they fix the issue\n   - Highlight the key differences between broken and fixed code\n\n4. **Prevention Tips**\n   - Suggest how to avoid similar bugs\n   - Recommend debugging tools or techniques\n   - Point out patterns that lead to robust code\n\n### Response Style\n- Be patient and systematic\n- Don't just give the answer - teach the debugging process\n- Use clear before/after code comparisons\n- Explain error messages in plain language\n- Validate your solution explains WHY it works\n\n### Common Bug Categories to Address\n- Syntax errors and typos\n- Logic errors and incorrect algorithms\n- Runtime errors and exceptions\n- Type errors and null/undefined issues\n- Scope and closure problems\n- Async/await and promise issues\n- Off-by-one errors and edge cases\n- Performance bottlenecks\n\n**Goal:** Not just fix the bug, but help the developer become a better debugger."},"project-ideas":{role:"developer",content:'You are a creative software development mentor specializing in generating project ideas and guiding project planning.\n\n### Core Responsibilities\n- Generate relevant, achievable project ideas based on skill level\n- Suggest projects that teach specific skills or technologies\n- Help scope projects appropriately\n- Provide implementation guidance and architecture suggestions\n- Inspire creativity while keeping ideas practical\n\n### Brainstorming Approach\n1. **Understand Context**\n   - Ask about skill level, interests, and learning goals\n   - Identify available time commitment and resources\n   - Determine if it\'s for learning, portfolio, or production use\n\n2. **Project Suggestions**\n   - Offer 3-5 concrete project ideas with varying complexity\n   - Explain what each project teaches\n   - Highlight real-world applications\n   - Suggest technologies/frameworks to use\n\n3. **Project Structure**\n   For each idea, provide:\n   - **Overview** - What the project does and why it\'s valuable\n   - **Key Features** - Core functionality to implement\n   - **Tech Stack** - Recommended languages, frameworks, tools\n   - **Learning Outcomes** - Skills and concepts you\'ll practice\n   - **Difficulty** - Beginner, Intermediate, or Advanced\n   - **Extensions** - Ideas for expanding the project\n\n### Project Categories\n- **Portfolio Projects** - Showcase skills to employers\n- **Learning Projects** - Master specific technologies\n- **Practical Tools** - Solve real problems\n- **Clone Projects** - Recreate existing apps to learn\n- **Experimental Projects** - Try new technologies\n- **Contribution Projects** - Open source ideas\n\n### Response Style\n- Be enthusiastic and encouraging\n- Tailor complexity to the user\'s level\n- Provide concrete, actionable ideas\n- Include implementation hints without spoiling the challenge\n- Suggest progressive features (MVP → advanced)\n\n### Platform Tutorial References\n**IMPORTANT:** When a user asks about building a specific project type, check if it matches specefic tutorials from the provided projects list. If there are matches:\n- **Always mention these at the END of your response**\n- List matching tutorials with their exact slugs\n- You can suggest multiple relevant tutorials if applicable\n- Frame it as: "We also have step-by-step tutorials for similar projects you might find helpful!"\n\n**Matching Guidelines:**\n- Match based on project type, technology, or concept (e.g., "tic tac toe" → "build-tic-tac-toe-with-javascript")\n- Consider related projects (e.g., "game" queries could match Phaser, Pygame, or p5.js game tutorials)\n- Be flexible with keyword matching (e.g., "weather app" → "view-weather-with-html-css-js")\n\n**Examples of GOOD matches:**\n- "tic tac toe game" → "build-tic-tac-toe-with-javascript" ✓\n- "weather app with JavaScript" → "view-weather-with-html-css-js" ✓\n- "Phaser game tutorial" → "build-a-flappy-bird-clone-with-phaser" ✓\n- "Discord bot" → "build-a-discord-bot-with-python" ✓\n\n**Examples of BAD matches (DO NOT suggest):**\n- "I want to build a game" → Don\'t suggest game tutorials (too general)\n- "Social media app" → Don\'t suggest "build-a-chat-app-with-socket-io" (not the same thing)\n- "Mobile app" → Don\'t suggest web tutorials (wrong platform)\n- "Music player" → Don\'t suggest "build-an-interactive-soundboard-with-p5js" (different c
1oncept)\n\n### Available Platform Tutorials\nHere are the project tutorials available on our platform:\n'.concat(i.map(e=>"- ".concat(e)).join("\n"),'\n\n**Mandatory Output Format:**\nEvery response that suggests tutorials MUST end with:\n\n~~~TUTORIALS_JSON\n{\n  "tutorials": ["exact-slug-1", "exact-slug-2"]\n}\n~~~\n\n**Goal:** Spark creativity, provide clear direction for building meaningful projects, and connect users to existing platform resources when available.')},"practice-problems":{role:"developer",content:"You are a programming tutor specializing in creating targeted practice problems and coding exercises.\n\n### Core Responsibilities\n- Generate relevant practice problems matched to skill level\n- Create exercises that reinforce specific concepts\n- Provide clear problem statements and constraints\n- Offer hints and guidance without giving away solutions\n- Review and analyze submitted solutions constructively\n\n### Practice Problem Format\n1. **Problem Statement**\n   - Clear description of what needs to be built\n   - Input/output specifications\n   - Example test cases\n   - Any constraints or requirements\n\n2. **Difficulty Indicator**\n   - Label as Beginner, Intermediate, or Advanced\n   - Estimate time to solve\n\n3. **Learning Focus**\n   - State which concepts/skills this problem practices\n   - Explain why this problem is valuable\n\n4. **Hints System** (provide progressively)\n   - Hint 1: Conceptual approach\n   - Hint 2: Algorithm or data structure suggestion\n   - Hint 3: Pseudocode or step-by-step guide\n\n5. **Solution Discussion** (after user attempts)\n   - Review their approach\n   - Show optimal solution(s)\n   - Discuss time/space complexity\n   - Point out alternative approaches\n\n### Problem Categories\n- **Algorithm Challenges** - Sorting, searching, recursion\n- **Data Structure Problems** - Arrays, linked lists, trees, graphs\n- **String Manipulation** - Parsing, transformation, pattern matching\n- **Logic Puzzles** - Problem-solving and critical thinking\n- **Real-World Scenarios** - Practical application problems\n- **Code Golf** - Write concise, elegant solutions\n- **Debugging Exercises** - Fix broken code\n- **System Design** - Architecture and scalability (advanced)\n\n### Response Style\n- Be encouraging and supportive\n- Start with easier problems and progressively increase difficulty\n- Provide multiple problems if requested\n- Celebrate creative or efficient solutions\n- Explain concepts if the user struggles\n- Never make the user feel inadequate\n\n### Adaptive Difficulty\n- Ask about current skill level if unclear\n- Adjust problem complexity based on user's responses\n- Offer easier problems if user struggles\n- Suggest harder challenges if user excels\n\n**Goal:** Build confidence and competence through deliberate, focused practice."},"language-teacher":{role:"developer",content:"You are an expert ".concat(o," instructor specializing in teaching ").concat(o," features, syntax, concepts, and best practices.\n\n### Your Specialization\nYou are focused exclusively on teaching **").concat(o,"**. Every explanation, example, and concept you discuss is within the context of ").concat(o,". When users ask questions, they are asking about ").concat(o," unless they explicitly mention another language for comparison.\n\n### Core Responsibilities\n- Teach ").concat(o," concepts from fundamentals to advanced topics\n- Explain ").concat(o," syntax, semantics, and language-specific features clearly\n- Provide practical, runnable ").concat(o," code examples\n- Guide users through ").concat(o,"-specific paradigms and idioms\n- Answer any ").concat(o,"-related questions with depth and clarity\n\n### Teaching Approach\n\n1. **Assess Understanding**\n   - Identify the user's current ").concat(o," knowledge level\n   - Determine if they're new to ").concat(o," or new to programming entirely\n   - Check if they're transitioning from another language to ").concat(o,"\n   - Tailor explanations to bridge their specific knowledge gaps\n\n2. **Structured Learning Path for ").concat(o,"**\n   - **Basics** - ").concat(o," syntax, variables, data types, operators\n   - **Control Flow** - Conditionals, loops, error handling in ").concat(o,"\n   - **Functions/Methods** - How ").concat(o," handles functions, parameters, returns\n   - **Data Structures** - ").concat(o,"'s built-in and custom data structures\n   - **Core Paradigms** - OOP, functional, or other paradigms ").concat(o," supports\n   - **Advanced Topics** - ").concat(o,"-specific advanced features\n   - **Ecosystem** - ").concat(o," package managers, build tools, popular frameworks\n\n3. **Explanation Format**\n   - **Concept Introduction** - What it is in ").concat(o," and why it matters\n   - **").concat(o," Syntax** - Line-by-line explanation with comments\n   - **Practical Examples** - Real-world ").concat(o," use cases with runnable code\n   - **").concat(o," Patterns** - Idiomatic ways to write ").concat(o," co
1de\n   - **Common ").concat(o," Pitfalls** - What to avoid and why\n   - **Practice Exercise** - Simple ").concat(o," task to reinforce learning\n\n### ").concat(o,"-Specific Teaching Focus\n\n**Language Context:**\n- Always assume questions are about ").concat(o,'\n- If "how do I do X?" → Show how to do X in ').concat(o,'\n- If "what is X?" → Explain X in the context of ').concat(o,'\n- If "why doesn\'t this work?" → Debug it as ').concat(o," code\n\n**").concat(o," Best Practices:**\n- Teach idiomatic ").concat(o," code from the start\n- Highlight ").concat(o," conventions and style guides\n- Show both beginner-friendly and expert-level ").concat(o," approaches\n- Explain ").concat(o,"'s philosophy and design principles\n- Point out ").concat(o,' version differences when relevant\n\n**Cross-Language Comparisons (When Helpful):**\n- Only compare to other languages when the user asks or when it clarifies a concept\n- Format: "In ').concat(o,', we do X, while in [other language] they do Y"\n- Always center the explanation back to ').concat(o,"\n- Use comparisons to help users transitioning to ").concat(o,"\n\n### ").concat(o," Code Example Standards\nEvery code example must be valid ").concat(o," code:\n- Use proper ").concat(o," syntax and conventions\n- Include complete, runnable ").concat(o," examples\n- Add inline comments explaining key ").concat(o,"-specific behavior\n- Show both basic and idiomatic ").concat(o," versions\n- Include expected output for clarity\n- Follow ").concat(o," naming conventions and style\n\nExample structure:\n// Basic ").concat(o," version - clear and explicit\n[basic example in ").concat(o,"]\n\n// Idiomatic ").concat(o," version - following best practices\n[idiomatic example in ").concat(o,"]\n\n// Usage\n[usage example with output]\n```\n\n### Response Style for ").concat(o," Teaching\n- **Progressive Complexity** - Start with simple ").concat(o,", then show advanced usage\n- **").concat(o,"-Specific Analogies** - Relate to ").concat(o,"'s mental model\n- **Visual Aids** - Use diagrams for ").concat(o,"-specific concepts (memory, execution, etc.)\n- **Encouraging Tone** - Celebrate ").concat(o," learning progress\n- **Interactive** - Offer to show more ").concat(o," examples or create exercises\n\n### Handling Common ").concat(o,' Questions\n\n**"How do I [do X]?"**\n→ Show how to do X in ').concat(o,"\n- The most idiomatic ").concat(o," way first\n- Alternative ").concat(o," approaches if relevant\n- Explain trade-offs in ").concat(o," context\n- When to use each approach in ").concat(o,'\n\n**"What is [concept]?"**\n→ Explain the concept as it exists in ').concat(o,"\n- How ").concat(o," implements or handles it\n- Why ").concat(o," does it this way\n- ").concat(o," code examples demonstrating it\n- Common ").concat(o,' use cases\n\n**"Why doesn\'t this work?"**\n→ Analyze as ').concat(o," code\n- Identify the ").concat(o,"-specific issue\n- Explain ").concat(o,"'s behavior causing the problem\n- Show the corrected ").concat(o," code\n- Teach the underlying ").concat(o,' concept\n\n**"What\'s the difference between X and Y?"**\n→ Compare X and Y within ').concat(o,"\n- Show ").concat(o," code demonstrating both\n- Explain when to use each in ").concat(o,"\n- Highlight ").concat(o,'-specific implications\n\n**"Can ').concat(o,' do [feature]?"**\n→ Answer definitively for ').concat(o,"\n- If yes: Show how with ").concat(o," examples\n- If no: Explain ").concat(o,"'s alternative approaches\n- Discuss ").concat(o,"'s design philosophy around this\n\n### ").concat(o," Learning Progression\nGuide users through mastering ").concat(o,":\n- Start with ").concat(o," fundamentals\n- Practice ").concat(o," daily with small exercises\n- Read idiomatic ").concat(o," code\n- Explore ").concat(o,"'s standard library\n- Learn ").concat(o," idioms and conventions\n- Build projects in ").concat(o,"\n- Use ").concat(o,"-specific debugging and profiling tools\n- Engage with the ").concat(o," community\n\n### ").concat(o," Ecosystem Guidance\nWhen relevant, discuss:\n- Popular ").concat(o," frameworks and libraries\n- ").concat(o," package management (pip, npm, cargo, etc.)\n- ").concat(o," build tools and bundlers\n- ").concat(o," testing frameworks\n- ").concat(o," documentation resources\n- ").concat(o," community standards and PEPs/RFCs/style guides\n\n### Platform Course References\n**IMPORTANT:** When teaching ").concat(o," concepts, check if we have relevant ").concat(o," courses. If there are matches:\n- **Mention these at the END of your response**\n- Only suggest ").concat(o,' courses that directly teach what was discussed\n- Frame it as: "If you want structured practice with ').concat(o,', we have courses covering this!"\n\n**Matching Guidelines:**\n- Match ').concat(o,"-specific courses to topics discu
1ssed\n- Match the concept level (beginner ").concat(o," question → beginner ").concat(o," courses)\n- Only suggest when the course reinforces the ").concat(o," topic taught\n\n### Available Platform Courses\nHere are the ").concat(o," courses available on our platform:\n\n### Critical Context Reminder\n\uD83C\uDFAF **Every question is about ").concat(o,'**. When a user asks "how do I...", "what is...", "can I...", or shows code without specifying a language, they mean **').concat(o,"**. You are their ").concat(o," expert.\n\n### Boundaries\n- Focus exclusively on ").concat(o,' education\n- For questions clearly about other languages, politely redirect: "I specialize in ').concat(o,". For [other language], you might want to consult that language's resources.\"\n- Decline requests for malicious ").concat(o," code or security bypasses\n- Keep all examples and discussions centered on ").concat(o,"\n\n**Goal:** Make ").concat(o," accessible and help users think like a native ").concat(o," developer, building both syntax knowledge and ").concat(o," intuition. Every interaction should deepen their ").concat(o," expertise.")},"generate-explain-questions":{role:"developer",content:'You are a learning assistant that generates engaging, course-specific questions for students.\n\nGiven a list of courses the student is currently taking, generate 3-4 relevant questions they might want to ask. Each question should:\n- Be specific to one of their current courses\n- Cover a fundamental or commonly misunderstood concept\n- Be 6 words maximum\n- Use the format "Explain [concept] in [course]" or "Explain [topic] in [course]"\n- Progress from specific concepts to broader topics (e.g., "Explain queries in SQL" then "Explain other topics in SQL")\n\nInput format:\nCOURSES: [comma-separated list of courses]\n\nOutput format:\nReturn ONLY valid JSON with no additional text, markdown formatting, or code blocks. Use this exact structure:\n{\n  "suggestions": [\n    "question text here",\n    "question text here"\n  ]\n}\n\nExample:\nInput: COURSES: SQL, HTML\nOutput:\n{\n  "suggestions": [\n    "Explain queries in SQL",\n    "Explain other topics in SQL",\n    "Explain the DOM in HTML"\n  ]\n}\n\nExample:\nInput: COURSES: Python, JavaScript, CSS\nOutput:\n{\n  "suggestions": [\n    "Explain loops in Python",\n    "Explain other topics in Python",\n    "Explain promises in JavaScript",\n    "Explain flexbox in CSS"\n  ]\n}\n\nNow generate questions for:\nCOURSES: '.concat(r)},"generate-project-questions":{role:"developer",content:'You are a learning assistant that generates engaging, course-specific project ideas for students.\n\nGiven a list of courses the student is currently taking, generate 4 relevant project ideas they could build. Each project should:\n- Be appropriate for their skill level based on the courses listed\n- Combine skills from one or more of their courses when possible\n- Be 6 words maximum\n- Be practical and achievable for a learner at this stage\n- Use the format "Brainstorm a [project name/description]" or "Brainstorm [project type]"\n- Range from beginner-friendly to slightly challenging projects\n\nReturn ONLY valid JSON with no additional text, markdown formatting, or code blocks. Use this exact structure:\n{\n  "suggestions": [\n    "project idea here",\n    "project idea here"\n  ]\n}\n\nExample:\nInput: COURSES: HTML, CSS\nOutput:\n{\n  "suggestions": [\n    "Brainstorm a portfolio website",\n    "Brainstorm a restaurant menu page",\n    "Brainstorm a landing page for a product",\n    "Brainstorm a photo gallery"\n  ]\n}\n\nExample:\nInput: COURSES: HTML, CSS, JavaScript\nOutput:\n{\n  "suggestions": [\n    "Brainstorm a to-do list app",\n    "Brainstorm a calculator",\n    "Brainstorm a weather dashboard",\n    "Brainstorm an interactive quiz game"\n  ]\n}\n\nExample:\nInput: COURSES: Python\nOutput:\n{\n  "suggestions": [\n    "Brainstorm a text adventure game",\n    "Brainstorm a password generator",\n    "Brainstorm a number guessing game",\n    "Brainstorm a simple chatbot"\n  ]\n}\n\nExample:\nInput: COURSES: SQL, Python\nOutput:\n{\n  "suggestions": [\n    "Brainstorm a contact manager with database",\n    "Brainstorm a movie recommendation system",\n    "Brainstorm a personal finance tracker",\n    "Brainstorm an inventory management system"\n  ]\n}\n\nNow generate project ideas for:\nCOURSES: '.concat(r)},"generate-language-teacher-questions":{role:"developer",content:'You are a learning assistant that generates engaging, course-specific questions for students at varying skill levels.\n\nGiven a course the student is currently taking, generate 4-5 relevant questions they might want to ask. Each question should:\n- Be specific to the course\n- Cover fundamental, intermediate, OR advanced concepts (mix difficulty levels)\n- Include commonly misunderstood topics, practical applications, and deeper theoretical concepts\n- Be 6 words maximum\n- Use the format "Explain [concept] in [course]" or "Explain [topic] in [course]"\n- Progress from specific concepts to broader topics (e.g., "Explain joins in SQL" then "Explain optimization in SQL" then "Explain other topics in SQL")\n- Include advanced patterns, performance considerations, ar
1chitectural concepts, and best practices where appropriate\n\nInput format:\nCOURSE: [single course name]\n\nOutput format:\nReturn ONLY valid JSON with no additional text, markdown formatting, or code blocks. Use this exact structure:\n{\n  "suggestions": [\n    "question text here",\n    "question text here"\n  ]\n}\n\nExample:\nInput: COURSE: SQL\nOutput:\n{\n  "suggestions": [\n    "Explain indexing strategies in SQL",\n    "Explain query optimization in SQL",\n    "Explain window functions in SQL",\n    "Explain transaction isolation in SQL",\n    "Explain other topics in SQL"\n  ]\n}\n\nExample:\nInput: COURSE: Python\nOutput:\n{\n  "suggestions": [\n    "Explain decorators in Python",\n    "Explain generators in Python",\n    "Explain metaclasses in Python",\n    "Explain async programming in Python",\n    "Explain other topics in Python"\n  ]\n}\n\nExample:\nInput: COURSE: React\nOutput:\n{\n  "suggestions": [\n    "Explain React reconciliation in React",\n    "Explain custom hooks in React",\n    "Explain performance optimization in React",\n    "Explain state management in React",\n    "Explain other topics in React"\n  ]\n}\n\nNow generate questions for:\nCOURSE: '.concat(o)}};return null!==(n=a[t])&&void 0!==n?n:a.general},c=t(28010),d=t(88090);let u=[];function useSendLumiMessage(e){let n=(0,r.T)(),t=(0,a.v9)(l.f8),p=(0,a.v9)(l.xF),h=(0,a.v9)(o.tV),m=(0,a.v9)(o.eE),g=(0,a.v9)(o.AU),f=e||g,x=(0,a.v9)((0,o.j0)(f||"")),b=(null==x?void 0:x.chatHistory)||u,v=(null==x?void 0:x.streaming)||!1,w=(0,a.v9)(c.a7),y=(0,a.v9)(d.Jv),H=(0,a.v9)(o.fP),V=(0,i.useCallback)(async function(e,n){try{let n=await fetch("/api/ai/generateTitle",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userMessage:e})});if(!n.ok)return console.error("Lumi title failed:",n.status,n.statusText),"New Chat";let{title:t}=await n.json();return t}catch(e){return console.error("Error generating title:",e),"New Chat"}},[]),j=(0,i.useCallback)(async function(e){if(v)return;let i=0===b.length,r="";i&&(r=await V(e,f)),n((0,o.gZ)({chatId:f,content:e,uid:t,newChatTitle:r,chatType:m})),await new Promise(e=>setTimeout(e,2));let a=Date.now().toString();if(n((0,o.hA)({chatId:f,id:a})),h>=5&&!p){n((0,o.kb)({chatId:f,id:a,error:"limit"}));return}p||((0,s.f)({uid:t,whichChat:"lumiChat"}),n((0,o.ez)(h+1)));let l=chatbot_lumiPrompts({taskType:m,projectsList:w,courseList:y,singleCourse:H}),c=b.slice(-5);try{var d;let i=await fetch("/api/ai/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({chatLog:[l,...c,{role:"user",content:e}]})});if(!i.ok){console.error("Lumi chat failed:",i.status,i.statusText),n((0,o.kb)({chatId:f,id:a}));return}let r=null===(d=i.body)||void 0===d?void 0:d.getReader(),s=new TextDecoder,u="";for(;;){let{done:e,value:i}=await r.read();if(e){n((0,o.cR)({chatId:f,id:a,uid:t}));break}let l=s.decode(i,{stream:!0});u+=l,n((0,o.O)({chatId:f,messageId:a,content:u}))}}catch(e){console.error("Error sending message:",e),n((0,o.kb)({chatId:f,id:a}))}},[v,b,n,f,t,h,p,V,m,w,y,H]);return{sendMessage:j,chatId:f}}},31875:function(e,n,t){var i=t(82729),r=t(85893),o=t(19521),a=t(67294),l=t(609),s=t(9473),c=t(73845),d=t(79311),u=t(92369),p=t(39828),h=t(29796),m=t(77265);function _templateObject(){let e=(0,i._)(['\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  font-family: "Mulish", sans-serif;\n  position: relative;\n\n  * {\n    margin: 0px;\n  }\n\n  p {\n    margin: 0px;\n  }\n\n  .icon-container {\n    padding: 8px;\n    margin: 0 -8px;\n    border-radius: 4px;\n    transition: 0.2s;\n    /* Keep the badge from being pulled to the left */\n    position: relative;\n\n    color: ',";\n\n    :hover {\n      background: ",";\n      color: ",";\n\n      svg {\n        path {\n          fill: ",";\n        }\n      }\n    }\n  }\n\n  .unread-notificaton-num {\n    position: absolute;\n    background-color: ",";\n    top: 0px;\n    right: -2px;\n    height: ",";\n    min-width: ",";\n    padding: 2px;\n    border-radius: 50%;\n    display: flex;\n    justify-content: center;
1\n    align-items: center;\n\n    .inner-notif-wrapper {\n      background-color: #f43f5e;\n      width: 100%;\n      height: 100%;\n      border-radius: 50%;\n      position: relative;\n\n      .globa-notif-number {\n        margin: 0;\n        font-size: 12px;\n        font-style: normal;\n        font-weight: 700;\n        line-height: 1;\n        color: #fff;\n\n        position: absolute;\n        top: 50%;\n        left: 50%;\n        transform: translate(-50%, -50%);\n      }\n    }\n  }\n\n  .tooltip {\n    top: 55px;\n    position: absolute;\n    left: 50%;\n    transform: translateX(-50%);\n    width: 120px;\n    min-width: 0px;\n  }\n"]);return _templateObject=function(){return e},e}let g=o.default.div.withConfig({componentId:"sc-72d9bf5d-0"})(_templateObject(),e=>{let{theme:n}=e;return n.colors.text.tertiary},e=>{let{theme:n}=e;return n.colors.background.grey.tertiary},e=>e.theme.colors.highlightBlue,e=>{let{theme:n}=e;return n.colors.text.accent.blue},e=>{let{theme:n}=e;return n.colors.background.grey.primary},e=>{let{large:n}=e;return n?"24px":"20px"},e=>{let{large:n}=e;return n?"24px":"20px"});n.Z=function(e){let{loggedIn:n,inCourseLE:t=!1,navFor:i="general"}=e,o=(0,c.T)(),f=(0,s.v9)(l.f8),x=(0,s.v9)(h.sk),[b,v]=(0,a.useState)(!1),w=(0,a.useRef)(null),y=(0,m.lL)();if((0,a.useEffect)(()=>{let{firestore:e}=(0,u.UM)();if(f){let n=(0,p.JU)(e,"communityNotifications",f),t=(0,p.IO)((0,p.hJ)(n,"notifications"),(0,p.ar)("read","==",!1)),i=(0,p.cf)(t,e=>{o((0,h.AY)(e.size))});return()=>i()}},[f,o,x]),(n||t)&&"general"==i)return(0,r.jsx)(g,{large:x>9,children:(0,r.jsxs)("div",{className:"icon-container nes-pointer",onMouseEnter:()=>{y.showTooltip("Notifications",w.current,"bottom")},onMouseLeave:()=>{y.hideTooltip()},onClick:()=>void(v(!1),o((0,l.J)({type:"notificationHub",status:"show",properties:{}}))),ref:w,children:[(0,r.jsx)(d.Dkj,{}),0!=x&&(0,r.jsx)("div",{className:"unread-notificaton-num",children:(0,r.jsx)("div",{className:"inner-notif-wrapper",children:(0,r.jsx)("p",{className:"globa-notif-number",children:x>9?"9+":x})})})]})})}},44898:function(e,n,t){var i=t(82729),r=t(85893),o=t(19521),a=t(67294),l=t(609),s=t(9473),c=t(73845),d=t(79311),u=t(77265),p=t(85673);function _templateObject(){let e=(0,i._)(['\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  font-family: "Mulish", sans-serif;\n  position: relative;\n\n  p {\n    margin: 0px;\n  }\n\n  .icon-container {\n    padding: 8px;\n    margin: 0 -8px;\n    border-radius: 4px;\n    transition: 0.2s;\n    top: 0px;\n    left: 0px;\n\n    svg {\n      path {\n        fill: ',";\n      }\n    }\n\n    :hover {\n      background: ",";\n      color: ",";\n\n      svg {\n        path {\n          fill: ",";\n        }\n      }\n    }\n  }\n"]);return _templateObject=function(){return e},e}let h=o.default.div.withConfig({componentId:"sc-757c6630-0"})(_templateObject(),e=>{let{theme:n}=e;return n.colors.text.tertiary},e=>{let{theme:n}=e;return n.colors.background.grey.tertiary},e=>e.theme.colors.highlightBlue,e=>{let{theme:n}=e;return n.colors.text.accent.blue});n.Z=function(e){let{inCourseLE:n,disableSearchToggle:t=!1}=e,i=(0,c.T)(),o=(0,s.v9)(p.QA),m=(0,a.useRef)(!1);(0,a.useEffect)(()=>{async function getSuggestedUsers(){try{let e=await fetch("/api/search/getSuggestedUsers");if(!e.ok){console.error("Failed to fetch suggested users: ".concat(e.status));return}let{users:n}=await e.json();n&&n.length>0&&i((0,p.lm)(n))}catch(e){console.error("Error fetching suggested users:",e)}}m.current||0!==o.length||(m.current=!0,getSuggestedUsers())},[i,o.length]);let g=(0,a.useRef)(null),f=(0,u.lL)();return n||t?null:(0,r.jsx)(h,{id:"global-search-toggle",children:(0,r.jsx)("div",{className:"icon-container nes-pointer",onMouseEnter:()=>{f.showTooltip("Search",g.current,"bottom")},onMouseLeave:()=>{f.hideTooltip()},onClick:()=>void i((0,l.J)({type:"searchDrawer",status:"show",properties:{}})),ref:g,children:(0,r.jsx)(d.olm,{})})})}},36473:function(e,n,t){t.d(n,{Z:function(){return mobile_MobileTabsContainer}});var i=t(82729),r=t(85893),o=t(67294),a=t(19521),l=t(41664),s=t.n(l);
1function _templateObject(){let e=(0,i._)(['\n  font-family: "Mulish", sans-serif;\n\n  button {\n    text-align: start;\n    width: 100%;\n    border: none;\n    outline: none;\n    padding: 0px;\n    margin: 0px;\n    background: none;\n    padding: 16px 16px;\n    color: ',";\n\n    border-bottom: 1px solid\n      ",';\n\n    font-feature-settings:\n      "liga" off,\n      "clig" off;\n    font-size: 18px;\n    font-weight: 700;\n    line-height: 150%;\n    display: flex;\n    align-items: center;\n\n    gap: 10px;\n\n    .svg-icon-holder {\n      width: 30px;\n    }\n\n    svg {\n      path {\n        fill: ',";\n      }\n    }\n  }\n"]);return _templateObject=function(){return e},e}let c=a.default.div.withConfig({componentId:"sc-bd7b739c-0"})(_templateObject(),e=>"dark"===e.theme.mode?"rgba(255, 255, 255, 0.87)":"black",e=>"dark"===e.theme.mode?"#334155":"#E2E8F0",e=>"dark"===e.theme.mode?"#94A3B8":"#64748B");var mobile_MobileLinkTab=function(e){let{tabName:n,link:t,showOnLogout:i=!0,showOnLogin:o=!0,svg:a,func:l}=e;if(i&&o)return(0,r.jsx)(c,{children:void 0===l?(0,r.jsx)(s(),{href:t,legacyBehavior:!0,children:(0,r.jsxs)("button",{onClick:l?()=>l():void 0,children:[(0,r.jsx)("span",{className:"svg-icon-holder",children:a}),n]})}):(0,r.jsxs)("button",{onClick:l,children:[(0,r.jsx)("span",{className:"svg-icon-holder",children:a}),n]})})};function MobileDropDownTab_templateObject(){let e=(0,i._)(['\n  font-family: "Mulish", sans-serif;\n\n  border-bottom: 1px solid\n    ',";\n\n  button {\n    text-align: start;\n    width: 100%;\n    border: none;\n    outline: none;\n    padding: 0px;\n    margin: 0px;\n    background: none;\n    padding: 16px 16px;\n    color: ",';\n    font-weight: 700;\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n\n    font-feature-settings:\n      "liga" off,\n      "clig" off;\n    font-size: 18px;\n    font-weight: 700;\n    line-height: 150%;\n\n    .svg-icon-holder {\n      width: 30px;\n    }\n\n    .name-container {\n      display: flex;\n      gap: 10px;\n\n      svg {\n        path {\n          fill: ',";\n        }\n      }\n\n      img {\n        border-radius: var(--Spacing-0px, 24px);\n        border: 1px solid\n          ",";\n\n        width: 24px;\n        height: 24px;\n      }\n    }\n\n    .icon-container {\n      transition: 0.4s;\n      transform: rotate(-90deg);\n      display: flex;\n\n      svg {\n        path {\n          fill: ",";\n        }\n      }\n    }\n  }\n\n  .menu-items {\n    padding-left: 2rem;\n    color: ",";\n\n    p {\n      :hover {\n        color: #2cbaff;\n      }\n    }\n  }\n\n  :hover {\n    /* button {\n      color: ",";\n    }\n\n    svg {\n      path {\n        fill: "," !important;\n      }\n    } */\n  }\n"]);return MobileDropDownTab_templateObject=function(){return e},e}let d=a.default.div.withConfig({componentId:"sc-6270310b-0"})(MobileDropDownTab_templateObject(),e=>"dark"===e.theme.mode?"#334155":"#E2E8F0",e=>"dark"===e.theme.mode?"rgba(255, 255, 255, 0.87)":"black",e=>"dark"===e.theme.mode?"#94A3B8":"#64748B",e=>"dark"===e.theme.mode?"#64748B":"#94A3B8",e=>"dark"===e.theme.mode?"#94A3B8":"#64748B",e=>"dark"===e.theme.mode?"rgba(255, 255, 255, 0.87)":"black",e=>e.theme.colors.highlightBlue,e=>e.theme.colors.highlightBlue);var mobile_MobileDropDownTab=function(e){let{tabName:n,menuItems:t,showOnLogout:i=!0,showOnLogin:a=!0,svg:l,setDropDownValue:s}=e,[c,u]=(0,o.useState)(!1);if(i&&a)return(0,r.jsx)(d,{openMenu:c,className:"dropdown-tab",children:(0,r.jsxs)("button",{onClick:()=>void s({list:t,tabName:n}),children:[(0,r.jsxs)("span",{className:"name-container",children:[(0,r.jsx)("span",{className:"svg-icon-holder",children:l}),n]}),(0,r.jsx)("span",{className:"icon-container",children:(0,r.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.83317 6.6665H4.1665V8.33317H5.83317V9.99984H7.49984V11.6665H9.1665V13.3332H10.8332V11.6665H12.4998V9.99984H14.1665V8.33317H15.8332V6.6665H14.1665V8.33317H12.4998V9.99984H10.8332V11.6665H9.1665V9.99984H7.49984V8.33317H5.83317V6.6665Z",fill:"#64748B"})})})]})})},u=t(62286),p=t.n(u),h=t(50037);
1function DropDownView_templateObject(){let e=(0,i._)(["\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n  width: 100%;\n\n  color: ",";\n\n  a {\n    all: unset;\n  }\n\n  .back-button {\n    padding: 8px 16px;\n    color: ",';\n    font-feature-settings:\n      "liga" off,\n      "clig" off;\n    font-family: "Mulish", sans-serif;\n\n    font-size: 16px;\n    font-style: normal;\n    font-weight: 700;\n    line-height: 150%;\n    display: flex;\n    align-items: center;\n    gap: 8px;\n\n    svg {\n      transform: rotate(90deg);\n      path {\n        fill: ',';\n      }\n    }\n  }\n\n  .link-container {\n    margin-top: 8px;\n    flex: 1;\n    overflow: scroll;\n\n    .link {\n      padding: 8px 16px;\n      transition: 0.2s;\n      display: flex;\n      align-items: center;\n      gap: 12px;\n      border-radius: 4px;\n\n      p {\n        margin: 0px;\n        font-feature-settings:\n          "liga" off,\n          "clig" off;\n        /* Mulish/M/Medium */\n        font-family: "Mulish", sans-serif;\n\n        font-size: 16px;\n        font-style: normal;\n        font-weight: 500;\n        line-height: 150%;\n      }\n\n      svg {\n        width: 20px;\n        height: 20px;\n      }\n\n      :hover {\n        background: ',";\n\n        color: ",";\n      }\n    }\n  }\n"]);return DropDownView_templateObject=function(){return e},e}let m=a.default.div.withConfig({componentId:"sc-8ed0a14d-0"})(DropDownView_templateObject(),e=>"dark"===e.theme.mode?"rgba(255, 255, 255, 0.87)":"black",e=>e.theme.colors.highlightBlue,e=>e.theme.colors.highlightBlue,e=>e.theme.colors.backgroundHighlight,e=>e.theme.colors.highlightBlue);var mobile_DropDownView=function(e){let{dropDownValue:n,setDropDownValue:t}=e;return(0,r.jsxs)(m,{children:[(0,r.jsxs)("div",{className:"back-button",onClick:()=>t(null),children:[(0,r.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.83317 6.6665H4.1665V8.33317H5.83317V9.99984H7.49984V11.6665H9.1665V13.3332H10.8332V11.6665H12.4998V9.99984H14.1665V8.33317H15.8332V6.6665H14.1665V8.33317H12.4998V9.99984H10.8332V11.6665H9.1665V9.99984H7.49984V8.33317H5.83317V6.6665Z",fill:"#64748B"})}),"Back to menu"]}),(0,r.jsx)("div",{className:"link-container",children:n.list.map(e=>(0,r.jsx)(s(),{href:e.func?"":e.link,children:(0,r.jsxs)("div",{className:"link nes-pointer",children:[e.icon&&e.icon,(0,r.jsx)("p",{onClick:e.func?()=>e.func():void 0,children:e.name})]},e)},e))})]})},g=t(73845),f=t(43910),x=t(92369),b=t(79311),v=t(78777),w=t(9473),y=t(609),H=t(61719),V=t(80386);function MobileTabDropdown_templateObject(){let e=(0,i._)(["\n  from {\n    right: calc(-1 * var(--nav-width));\n  }\n  to {\n    right: 0px;\n  }\n"]);return MobileTabDropdown_templateObject=function(){return e},e}function _templateObject1(){let e=(0,i._)(["\n  from {\n    right: 0px;\n  }\n  to {\n    right: calc(-1 * var(--nav-width));\n  }\n"]);return _templateObject1=function(){return e},e}function _templateObject2(){let e=(0,i._)(['\n  z-index: 14;\n  position: fixed;\n  top: 0px;\n  left: 0%;\n  height: 100dvh;\n  width: 100vw;\n  font-family: "Mulish", sans-serif;\n  opacity: 0;\n  animation: opac 0.2s ease-out forwards;\n\n  &.closing {\n    animation: opacOut 0.3s ease-out forwards;\n  }\n  pointer-events: none;\n  background-color: ',";\n\n  p,\n  label {\n    margin: 0px;\n  }\n\n  @keyframes opac {\n    from {\n      opacity: 0;\n    }\n    to {\n      opacity: 1;\n    }\n  }\n\n  @keyframes opacOut {\n    from {\n      opacity: 1;\n    }\n    to {\n      opacity: 0;\n    }\n  }\n\n  .outer-mobile-nav-wrapper {\n    width: inherit;\n    height: inherit;\n    position: relative;\n    --nav-width: calc(100vw - 1rem);\n\n    .inner-mobile-nav-wrapper {\n      pointer-events: auto;\n      position: absolute;\n      top: 0px;\n      right: calc(-1 * var(--nav-width));\n      height: inherit;\n      width: var(--nav-width);\n      background-color: ",";\n      border-left: 2px solid ",";\n      display: flex;\n      flex-direction: column;\n      animation: "," 0.3s forwards;\n      box-shadow: 0px 4px 32px 0px\n        ",";\n      transition: right 0.3s ease-out;\n\n      &.slide-out {\n        animation: "," 0.3s forwards;\n      }\n\n      .mobile-tabs-header {\n        padding: 18px 14px;\n        display: flex;\n        align-items: center;\n        gap: 16px;\n        border-bottom: 2px solid ",";\n\n        .close-btn {\n          /* extend touch target without affecting layout */\n          padding: 8px;\n          margin: -8px;\n          border-radius: 4px;\n          transition: 0.2s;\n\n          :hover {\n            background: ",";\n\n            svg path {\n              fill: ",";\n            }\n          }\n        }\n\n        svg {\n          width: 24px;\n          height: 24px;\n\n          path {\n            fill: ",";\n          }\n        }\n\n        p {\n          color: ",";\n          font-size: 20px;\n          font-style: normal;\n          font-weight: 700;\n          line-height: 120%;\n        }\n      }\n\n      .tabs-list {\n        padding: 12px;\n        flex: 1;\n        overflow: auto;\n        display: flex;\n        flex-direction: column;\n      }\n    }\n  }\n\n  border-bottom: 2px solid\n    ",";\n\n  .dropdown-tab:last-child {\n    border: none;\n  }\n"]);
1return _templateObject2=function(){return e},e}let j=(0,a.keyframes)(MobileTabDropdown_templateObject()),k=(0,a.keyframes)(_templateObject1()),M=a.default.div.withConfig({componentId:"sc-1eaac204-0"})(_templateObject2(),e=>{let{theme:n}=e;return n.colors.background.grey.overlay},e=>{let{theme:n}=e;return n.colors.background.grey.primary},e=>{let{theme:n}=e;return n.colors.border.grey.medium},j,e=>{let{theme:n}=e;return n.colors.background.grey.boxshadow},k,e=>{let{theme:n}=e;return n.colors.border.grey.light},e=>{let{theme:n}=e;return n.colors.background.grey.tertiary},e=>{let{theme:n}=e;return n.colors.text.accent.blue},e=>{let{theme:n}=e;return n.colors.text.tertiary},e=>{let{theme:n}=e;return n.colors.text.primary},e=>"dark"===e.theme.mode?"#334155":"#E2E8F0");var mobile_MobileTabDropdown=function(e){let{toggleMenu:n}=e,t=(0,g.T)(),i=(0,w.v9)(y.o4)||"dark",a=(0,w.v9)(y.zr),l=p().get().codedextoken,s=localStorage.getItem("photoURL")||"",[c,d]=(0,o.useState)(!1),[u,m]=(0,o.useState)(null),j=(0,o.useCallback)(()=>{let e="light"===i?"dark":"light";t((0,y.i5)({colorMode:e}))},[i,t]),k=(0,o.useCallback)(async function(){let{auth:e}=(0,x.UM)();try{localStorage.removeItem("photoURL"),localStorage.removeItem("username"),(0,h.xd)(),p().destroy(null,"hideGbClubbers");try{await fetch("/api/auth/sessionLogout",{method:"POST"})}catch(e){console.error("Error clearing session cookie:",e)}await (0,f.w7)(e),t((0,y.ix)()),document.location.reload()}catch(e){console.error(e)}},[t]);return(0,V.y)(),(0,r.jsx)(M,{className:c?"closing":"",style:{paddingBottom:u&&"16px"},children:(0,r.jsx)("div",{className:"outer-mobile-nav-wrapper",children:(0,r.jsxs)("div",{className:"inner-mobile-nav-wrapper ".concat(c?"slide-out":""),children:[(0,r.jsxs)("div",{className:"mobile-tabs-header",children:[(0,r.jsx)("div",{className:"close-btn nes-pointer",onClick:()=>void(d(!0),setTimeout(()=>{n()},300)),children:(0,r.jsx)(b.x8P,{})}),(0,r.jsx)("p",{children:u&&u.tabName?u.tabName:"Menu"})]}),(0,r.jsx)("div",{className:"tabs-list",children:u?(0,r.jsx)(mobile_DropDownView,{dropDownValue:u,setDropDownValue:m}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(mobile_MobileLinkTab,{tabName:"Dashboard",link:"/home",svg:(0,r.jsx)(v.Z,{}),showOnLogin:!!l}),(0,r.jsx)(mobile_MobileDropDownTab,{tabName:"Learn",menuItems:[{name:"All Courses",link:"/courses"},{name:"Python",link:"/python"},{name:"Intermediate Python",link:"/intermediate-python"},{name:"NumPy",link:"/numpy"},{name:"SQL",link:"/sql"},{name:"HTML",link:"/html"},{name:"CSS",link:"/css"},{name:"JavaScript",link:"/javascript"},{name:"Intermediate JavaScript",link:"/intermediate-javascript"},{name:"React",link:"/react"},{name:"Command Line",link:"/command-line"},{name:"Git & GitHub",link:"/git-github"},{name:"p5.js",link:"/p5js"},{name:"GenAI",link:"/gen-ai"},{name:"C++",link:"/cpp"},{name:"C#",link:"/c-sharp"},{name:"Java",link:"/java"},{name:"Node.js",link:"/nodejs"},{name:"Data Structures & Algorithms",link:"/data-structures-and-algorithms"},{name:"Phaser",link:"/phaser"},{name:"Pandas",link:"/pandas"},{name:"Machine Learning",link:"/machine-learning"},{name:"GitHub Copilot",link:"/github-copilot"},{name:"Lua",link:"/lua"},{name:"Matplotlib",link:"/matplotlib"},{name:"UI/UX Design",link:"/ui-ux-design"}],svg:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 3.5H11V5.5H3V17.5H11V5.5H13V17.5H21V5.5H13V3.5H21H23V5.5V17.5V19.5H21H13V21.5H11V19.5H3H1V17.5V5.5V3.5H3ZM19 10.5H15V12.5H19V10.5ZM15 7.5H19V9.5H15V7.5ZM17 13.5H15V15.5H17V13.5Z",fill:"#94A3B8"})}),setDropDownValue:m}),(0,r.jsx)(mobile_MobileDropDownTab,{tabName:"Practice",menuItems:[{name:"Challenge Packs",link:"/challenges"},{name:"Project Tutorials",link:"/projects"},{name:"#30NitesOfCode",link:"".concat(l?"/@".concat(a,"/30-nites-of-code"):"/30-nites-of-code")}],svg:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 2.5H16V4.5H6V2.5ZM4 6.5V4.5H6V6.5H4ZM4 18.5H2V6.5H4V18.5ZM6 20.5H4V18.5H6V20.5ZM18 20.5H6V22.5H18V20.5ZM20 18.5V20.5
1H18V18.5H20ZM20 18.5H22V8.5H20V18.5ZM12 6.5H8V8.5H6V16.5H8V18.5H16V16.5H18V12.5H16V16.5H8V8.5H12V6.5ZM14 14.5V10.5H16V8.5H18V6.5H20H22V4.5H20V2.5H18V4.5V6.5H16V8.5H14V10.5H10V14.5H14Z",fill:"#94A3B8"})}),setDropDownValue:m}),(0,r.jsx)(mobile_MobileDropDownTab,{tabName:"Community",menuItems:[{name:"Home",link:"/community"},{name:"Leaderboard",link:"/community/leaderboards"},{name:"Project Showcase",link:"/community/project-showcase"},{name:"Monthly Challenge",link:"/community/monthly-challenge"},{name:"#30NitesOfCode",link:"/community/30-nites-of-code"},{name:"Blog",link:"/blog"}],svg:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.0002 2.5H2.00024V4.49994H2V16.4999H4V4.5H20V16.4999H12V18.4999H10V20.4999H8V18.5H8.00024V16.5H8V16.4999H6V16.5H2.00024V18.5H6V22.4999H8H10V20.4999H12V18.4999H22V16.4999V4.5H22.0002V2.5Z",fill:"#94A3B8"})}),setDropDownValue:m}),(0,r.jsx)(mobile_MobileLinkTab,{tabName:"Pricing",link:"/pricing",svg:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.9998 2.5H12.9998V6.5H19V8.5H7.00003V11.5H5.00003V8.5H5V6.5H10.9998V2.5ZM5 18.5H11V22.5H13V18.5H19V16.5H5V18.5ZM19 11.5H5V13.5H17V16.5H19V13.5H19V11.5Z",fill:"#94A3B8"})})}),(0,r.jsx)(mobile_MobileDropDownTab,{tabName:"Account",menuItems:[{name:"Profile",link:"/@".concat(a),icon:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.4997 1.6665H7.49967V3.33312H5.83321V8.33312H7.49988V3.33317H12.4997V1.6665ZM12.4997 8.33317H7.49967V9.99984H12.4997V8.33317ZM12.4999 3.33312H14.1665V8.33312H12.4999V3.33312ZM3.33301 13.3331H4.99967V11.6665H14.9997V13.3332H4.99967V16.6665H14.9998V13.3331H16.6665V18.3331H16.6663V18.3332H3.33301V18.3331V16.6665V13.3331Z",fill:"#94A3B8"})})},{name:"Bookmarks",link:"/bookmarks",icon:(0,r.jsx)(H.Z,{})},{name:"Account",link:"/account",icon:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.33366 3.3335H8.33366V5.8335H18.3337V7.50016H8.33366V10.0002H3.33366V7.50016H1.66699V5.8335H3.33366V3.3335ZM5.00033 5.00016V8.3335H6.66699V5.00016H5.00033ZM11.667 10.0002H16.667V12.5002H18.3337V14.1668H16.667V16.6668H11.667V14.1668H1.66699V12.5002H11.667V10.0002ZM13.3337 11.6668V15.0002H15.0003V11.6668H13.3337
1Z",fill:"#94A3B8"})})},{name:"Switch theme",link:"",func:j,icon:"light"===i?(0,r.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("g",{clipPath:"url(#clip0_681_9546)",children:(0,r.jsx)("g",{clipPath:"url(#clip1_681_9546)",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13 0H11V4H13V0ZM0 11V13H4V11H0ZM24 11V13H20V11H24ZM13 24H11V20H13V24ZM8 6H16V8H8V6ZM6 8H8V16H6V8ZM8 18V16H16V18H8ZM18 16H16V8H18V16ZM20 2H22V4H20V2ZM20 4V6H18V4H20ZM22 22H20V20H22V22ZM20 20H18V18H20V20ZM4 2H2V4H4V6H6V4H4V2ZM2 22H4V20H6V18H4V20H2V22Z",fill:"#64748B"})})}),(0,r.jsxs)("defs",{children:[(0,r.jsx)("clipPath",{id:"clip0_681_9546",children:(0,r.jsx)("rect",{width:"24",height:"24",fill:"white"})}),(0,r.jsx)("clipPath",{id:"clip1_681_9546",children:(0,r.jsx)("rect",{width:"24",height:"24",fill:"white"})})]})]}):(0,r.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("g",{clipPath:"url(#clip0_681_6745)",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 2H14V4H12V6H10V4H6V2ZM4 6V4H6V6H4ZM4 16H2V6H4V16ZM6 18H4V16H6V18ZM8 20H6V18H8V20ZM18 20V22H8V20H18ZM20 18V20H18V18H20ZM18 14H20V18H22V10H20V12H18V14ZM12 14V16H18V14H12ZM10 12H12V14H10V12ZM10 12V6H8V12H10Z",fill:"#94A3B8"})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_681_6745",children:(0,r.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]})},{name:"Sign out",link:"",func:k,icon:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.16667 2.5H15.8333H17.5V4.16667V5.83333H15.8333V4.16667H4.16667V15.8333H15.8333V14.1667H17.5V15.8333V17.5H15.8333H4.16667H2.5V15.8333V4.16667V2.5H4.16667ZM17.5 9.16667H15.8333V7.5H14.1667V5.83333H12.5V7.5H14.1667V9.16667H5.83333V10.8333L14.1667 10.8333V12.5H12.5V14.1667H14.1667V12.5H15.8333V10.8333L17.5 10.8333V9.16667Z",fill:"#94A3B8"})})}],showOnLogout:!!l,svg:(0,r.jsx)("img",{src:s,alt:"user profile"}),setDropDownValue:m}),(0,r.jsx)(mobile_MobileLinkTab,{tabName:"Switch theme",link:"/login",showOnLogin:!l,func:j,svg:"light"===i?(0,r.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("g",{clipPath:"url(#clip0_681_9546)",children:(0,r.jsx)("g",{clipPath:"url(#clip1_681_9546)",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13 0H11V4H13V0ZM0 11V13H4V11H0ZM24 11V13H20V11H24ZM13 24H11V20H13V24ZM8 6H16V8H8V6ZM6 8H8V16H6V8ZM8 18V16H16V18H8ZM18 16H16V8H18V16ZM20 2H22V4H20V2ZM20 4V6H18V4H20ZM22 22H20V20H22V22ZM20 20H18V18H20V20ZM4 2H2V4H4V6H6V4H4V2ZM2 22H4V20H6V18H4V20H2V22Z",fill:"#64748B"})})}),(0,r.jsxs)("defs",{children:[(0,r.jsx)("clipPath",{id:"clip0_681_9546",children:(0,r.jsx)("rect",{width:"24",height:"24",fill:"white"})}),(0,r.jsx)("clipPath",{id:"clip1_681_9546",children:(0,r.jsx)("rect",{width:"24",height:"24",fill:"white"})})]})]}):(0,r.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("g",{clipPath:"url(#clip0_681_6745)",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 2H14V4H12V6H10V4H6V2ZM4 6V4H6V6H4ZM4 16H2V6H4V16ZM6 18H4V16H6V18ZM8 20H6V18H8V20ZM18 20V22H8V20H18ZM20 18V20H18V18H20ZM18 14H20V18H22V10H20V12H18V14ZM12 14V16H18V14H12ZM10 12H12V14H10V12ZM10 12V6H8V12H10Z",fill:"#94A3B8"})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_681_6745",children:(0,r.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]})}),(0,r.jsx)(mobile_MobileLinkTab,{tabName:"Sign in",link:"/login",showOnLogin:!l,svg:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.4997 1.6665H7.49967V3.33312H5.83321V8.33312H7.49988V3.33317H12.4997V1.6665ZM12.4997 8.33317H7.49967V9.99984H12.4997V8.33317ZM12.4999 3.33312H14.1665V8.33312H12.4999V3.33312ZM3.33301 13.3331H4.99967V11.6665H14.9997V13.3332H4.99967V16.6665H14.9998V13.3331H16.6665V18.3331H16.6663V18.3332H3.33301V18.3331V16.6665V13.3331Z",fill:"#94A3B8"})})})]})})]})})})},C=t(88090),Z=t(86247),_=t(53835),S=t(62030),E=t(39828),B=t(29796);
1function MobileNotificationNavTab_templateObject(){let e=(0,i._)(['\n  font-family: "Mulish", sans-serif;\n  position: relative;\n\n  button {\n    text-align: start;\n    width: 100%;\n    border: none;\n    outline: none;\n    padding: 0px;\n    margin: 0px;\n    background: none;\n    padding: 16px 16px;\n    color: ',";\n\n    border-bottom: 1px solid\n      ",';\n\n    font-feature-settings:\n      "liga" off,\n      "clig" off;\n    font-size: 18px;\n    font-weight: 700;\n    line-height: 150%;\n    display: flex;\n\n    gap: 10px;\n\n    .svg-icon-holder {\n      width: 30px;\n    }\n\n    svg {\n      path {\n        fill: ',";\n      }\n    }\n  }\n\n  .notification-num {\n    margin: 0px;\n    background-color: #f43f5e;\n    border-radius: 50%;\n    padding: 0 3px;\n    width: fit-content;\n    height: fit-content;\n    min-width: 20px;\n    height: 20px;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    color: #fff;\n    text-align: center;\n    font-size: 12px;\n    font-style: normal;\n    font-weight: 700;\n    line-height: normal;\n    position: absolute;\n    top: 50%;\n    transform: translateY(-50%);\n    right: 16px;\n  }\n"]);return MobileNotificationNavTab_templateObject=function(){return e},e}let T=a.default.div.withConfig({componentId:"sc-96b64d7a-0"})(MobileNotificationNavTab_templateObject(),e=>"dark"===e.theme.mode?"rgba(255, 255, 255, 0.87)":"black",e=>"dark"===e.theme.mode?"#334155":"#E2E8F0",e=>"dark"===e.theme.mode?"#94A3B8":"#64748B");var mobile_MobileNotificationNavTab=function(){let e=(0,g.T)(),n=(0,w.v9)(y.f8),t=(0,w.v9)(B.sk);return(0,o.useEffect)(()=>{let{firestore:t}=(0,x.UM)();if(n){let i=(0,E.JU)(t,"communityNotifications",n),r=(0,E.IO)((0,E.hJ)(i,"notifications"),(0,E.ar)("read","==",!1)),o=(0,E.cf)(r,n=>{e((0,B.AY)(n.size))});return()=>o()}},[n,e,t]),(0,r.jsxs)(T,{children:[(0,r.jsxs)("button",{onClick:function(){e((0,y.J)({type:"notificationHub",status:"show",properties:{}}))},children:[(0,r.jsx)("span",{className:"svg-icon-holder",children:(0,r.jsx)(S.Z,{})}),"Notifications"]}),t>0&&(0,r.jsx)("p",{className:"notification-num",children:t})]})},O=t(36326);function MobileCourseNavDropDown_templateObject(){let e=(0,i._)(["\n  position: absolute;\n  left: 0px;\n  top: 83px;\n  height: fit-content;\n  width: 100%;\n  background-color: ",";\n  overflow: auto;\n  max-height: calc(100vh - 62px);\n  padding: 12px 12px 0px 12px;\n\n  border-bottom: 2px solid\n    ",";\n\n  .dropdown-tab:last-child {\n    border: none;\n  }\n"]);return MobileCourseNavDropDown_templateObject=function(){return e},e}let N=a.default.div.withConfig({componentId:"sc-60af35a7-0"})(MobileCourseNavDropDown_templateObject(),e=>{let{theme:n}=e;return n.colors.background.grey.primary},e=>"dark"===e.theme.mode?"#334155":"#E2E8F0");var mobile_MobileCourseNavDropDown=function(e){let{courseConfig:n}=e,t=(0,g.T)(),i=(0,w.v9)(y.o4)||"dark",a=(0,w.v9)(y.zr),l=p().get().codedextoken,s=localStorage.getItem("photoURL")||"",{catalogName:c}=(0,w.v9)((0,C.Gm)({courseName:n.internalCourseName})),[d,u]=(0,o.useState)(null),m=(0,o.useCallback)(()=>{let e="light"===i?"dark":"light";t((0,y.i5)({colorMode:e}))},[i,t]),b=(0,o.useCallback)(async function(){let{auth:e}=(0,x.UM)();try{localStorage.removeItem("photoURL"),localStorage.removeItem("username"),(0,h.xd)(),p().destroy(null,"hideGbClubbers"),await (0,f.w7)(e),t((0,y.ix)()),document.location.reload()}catch(e){console.error(e)}},[t]);return(0,r.jsx)(N,{style:{paddingBottom:d&&"16px"},children:d?(0,r.jsx)(mobile_DropDownView,{dropDownValue:d,setDropDownValue:u}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(mobile_MobileLinkTab,{tabName:"Dashboard",link:"/home",svg:(0,r.jsx)(v.Z,{})}),(0,r.jsx)(mobile_MobileLinkTab,{tabName:"".concat(c," course page"),link:n.courseLink,svg:(0,r.jsx)(Z.Z,{})}),(0,r.jsx)(mobile_MobileLinkTab,{tabName:"Report a bug",link:O.n.bugReport,svg:(0,r.jsx)(_.Z,{})}),!l&&(0,r.jsx)(mobile_MobileLinkTab,{tabName:"Pricing",link:"/pricing",svg:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.9998 2.5H12.9998V6.5H19V8.5H7.00003V11.5H5.00003V8.5H5V6.5H10.9998V2.5ZM5 18.5H11V22.5H13V18.5H19V16.5H5V18.5ZM19 11.5H5V13.5H17V16.5H19V13.5H19V11.5Z",fill:"#94A3B8"})})}),l&&(0,r.jsx)(mobile_MobileNotificationNavTab,{}),(0,r.jsx)(mobile_MobileDropDownTab,{tabName:"Account",menuItems:[{name:"Profile",link:"/@".concat(a),icon:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.4997 1.6665H7.49967V3.33312H5.83321V8.33312H7.49988V3.33317H12.4997V1.6665ZM12.4997 8.33317H7.49967V9.99984H12.4997V8.33317ZM12.4999 3.33312H14.1665V8.33312H12.4999V3.33312ZM3.33301 13.3331H4.99967V11.6665H14.9997V13.3332H4.99967V16.6665H14.9998V13.3331H16.6665V18.3331H16.6663V18.3332H3.33301V18.3331V16.6665V13.3331Z",fill:"#94A3B8"})})},{name:"Settings",link:"/account",icon:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.33366 3.3335H8.33366V5.8335H18.3337V7.50016H8.33366V10.0002H3.33366V7.50016H1.66699V5.8335H3.33366V3.3335ZM5.00033 5.00016V8.3335H6.66699V5.00016H5.00033ZM11.667 10.0002H16.667V12.5002H18.3337V14.1668H16.667V16.6668H11.667V14.1668H1.66699V12.5002H11.667V10.0002ZM13.3337 11.6668V15.0002H15.0003V11.6668H13.3337
1Z",fill:"#94A3B8"})})},{name:"Switch theme",link:"",func:m,icon:"light"===i?(0,r.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("g",{clipPath:"url(#clip0_681_9546)",children:(0,r.jsx)("g",{clipPath:"url(#clip1_681_9546)",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13 0H11V4H13V0ZM0 11V13H4V11H0ZM24 11V13H20V11H24ZM13 24H11V20H13V24ZM8 6H16V8H8V6ZM6 8H8V16H6V8ZM8 18V16H16V18H8ZM18 16H16V8H18V16ZM20 2H22V4H20V2ZM20 4V6H18V4H20ZM22 22H20V20H22V22ZM20 20H18V18H20V20ZM4 2H2V4H4V6H6V4H4V2ZM2 22H4V20H6V18H4V20H2V22Z",fill:"#64748B"})})}),(0,r.jsxs)("defs",{children:[(0,r.jsx)("clipPath",{id:"clip0_681_9546",children:(0,r.jsx)("rect",{width:"24",height:"24",fill:"white"})}),(0,r.jsx)("clipPath",{id:"clip1_681_9546",children:(0,r.jsx)("rect",{width:"24",height:"24",fill:"white"})})]})]}):(0,r.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("g",{clipPath:"url(#clip0_681_6745)",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 2H14V4H12V6H10V4H6V2ZM4 6V4H6V6H4ZM4 16H2V6H4V16ZM6 18H4V16H6V18ZM8 20H6V18H8V20ZM18 20V22H8V20H18ZM20 18V20H18V18H20ZM18 14H20V18H22V10H20V12H18V14ZM12 14V16H18V14H12ZM10 12H12V14H10V12ZM10 12V6H8V12H10Z",fill:"#94A3B8"})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_681_6745",children:(0,r.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]})},{name:"Sign out",link:"",func:b,icon:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.16667 2.5H15.8333H17.5V4.16667V5.83333H15.8333V4.16667H4.16667V15.8333H15.8333V14.1667H17.5V15.8333V17.5H15.8333H4.16667H2.5V15.8333V4.16667V2.5H4.16667ZM17.5 9.16667H15.8333V7.5H14.1667V5.83333H12.5V7.5H14.1667V9.16667H5.83333V10.8333L14.1667 10.8333V12.5H12.5V14.1667H14.1667V12.5H15.8333V10.8333L17.5 10.8333V9.16667Z",fill:"#94A3B8"})})}],showOnLogout:!!l,svg:(0,r.jsx)("img",{src:s,alt:"user profile"}),setDropDownValue:u}),(0,r.jsx)(mobile_MobileLinkTab,{tabName:"Switch theme",link:"/login",showOnLogin:!l,func:m,svg:"light"===i?(0,r.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("g",{clipPath:"url(#clip0_681_9546)",children:(0,r.jsx)("g",{clipPath:"url(#clip1_681_9546)",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13 0H11V4H13V0ZM0 11V13H4V11H0ZM24 11V13H20V11H24ZM13 24H11V20H13V24ZM8 6H16V8H8V6ZM6 8H8V16H6V8ZM8 18V16H16V18H8ZM18 16H16V8H18V16ZM20 2H22V4H20V2ZM20 4V6H18V4H20ZM22 22H20V20H22V22ZM20 20H18V18H20V20ZM4 2H2V4H4V6H6V4H4V2ZM2 22H4V20H6V18H4V20H2V22Z",fill:"#64748B"})})}),(0,r.jsxs)("defs",{children:[(0,r.jsx)("clipPath",{id:"clip0_681_9546",children:(0,r.jsx)("rect",{width:"24",height:"24",fill:"white"})}),(0,r.jsx)("clipPath",{id:"clip1_681_9546",children:(0,r.jsx)("rect",{width:"24",height:"24",fill:"white"})})]})]}):(0,r.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("g",{clipPath:"url(#clip0_681_6745)",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 2H14V4H12V6H10V4H6V2ZM4 6V4H6V6H4ZM4 16H2V6H4V16ZM6 18H4V16H6V18ZM8 20H6V18H8V20ZM18 20V22H8V20H18ZM20 18V20H18V18H20ZM18 14H20V18H22V10H20V12H18V14ZM12 14V16H18V14H12ZM10 12H12V14H10V12ZM10 12V6H8V12H10Z",fill:"#94A3B8"})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_681_6745",children:(0,r.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]})}),(0,r.jsx)(mobile_MobileLinkTab,{tabName:"Sign in",link:"/login",showOnLogin:!l,svg:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.4997 1.6665H7.49967V3.33312H5.83321V8.33312H7.49988V3.33317H12.4997V1.6665ZM12.4997 8.33317H7.49967V9.99984H12.4997V8.33317ZM12.4999 3.33312H14.1665V8.33312H12.4999V3.33312ZM3.33301 13.3331H4.99967V11.6665H14.9997V13.3332H4.99967V16.6665H14.9998V13.3331H16.6665V18.3331H16.6663V18.3332H3.33301V18.3331V16.6665V13.3331Z",fill:"#94A3B8"})})})]})})},D=t(31875),L=t(44898);
1function MobileTabsContainer_templateObject(){let e=(0,i._)(["\n  display: flex;\n  align-items: center;\n  gap: 1.75rem;\n\n  .icon-container {\n    padding: 8px;\n    margin: 0 -8px;\n    border-radius: 4px;\n    transition: 0.2s;\n\n    color: ",";\n\n    :hover {\n      background: ",";\n\n      color: ",";\n    }\n  }\n\n  "," {\n    margin-right: 0.3rem;\n  }\n  "," {\n    margin-right: 0rem;\n  }\n"]);return MobileTabsContainer_templateObject=function(){return e},e}let I=a.default.div.withConfig({componentId:"sc-fb989cbf-0"})(MobileTabsContainer_templateObject(),e=>{let{theme:n}=e;return n.colors.text.tertiary},e=>{let{theme:n}=e;return n.colors.background.grey.tertiary},e=>{let{theme:n}=e;return n.colors.text.accent.blue},e=>{let{theme:n}=e;return n.breakpoints.xs},e=>{let{theme:n}=e;return n.breakpoints.sm});var mobile_MobileTabsContainer=function(e){let{navFor:n="general",courseConfig:t={}}=e,[i,a]=(0,o.useState)(!1),[l,s]=(0,o.useState)(localStorage.getItem("photoURL")||"");function toggleMenu(){a(!i)}let c={general:(0,r.jsx)(mobile_MobileTabDropdown,{toggleMenu:toggleMenu}),course:(0,r.jsx)(mobile_MobileCourseNavDropDown,{courseConfig:t})};return(0,r.jsxs)(I,{children:[(0,r.jsx)(L.Z,{inCourseLE:"course"===n}),(0,r.jsx)(D.Z,{loggedIn:l,navFor:n}),(0,r.jsx)("div",{className:"icon-container nes-pointer",onClick:toggleMenu,children:i?(0,r.jsx)(b.x8P,{}):(0,r.jsx)(b.prg,{})}),i&&c[n]]})}},16877:function(e,n,t){var i=t(82729),r=t(85893),o=t(19521);function _templateObject(){let e=(0,i._)(["\n  padding: 8px 12px;\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  border-radius: 4px;\n\n  &.default {\n    svg {\n      path {\n        fill: ",";\n      }\n    }\n  }\n\n  &.delete {\n    p {\n      color: ",";\n    }\n\n    svg {\n      path {\n        /* fill: ","; */\n      }\n    }\n\n    :hover {\n      background-color: ",";\n\n      p {\n        color: ",";\n      }\n\n      svg {\n        path {\n          fill: ",";\n        }\n      }\n    }\n  }\n\n  .dropdown-text {\n    color: ",";\n    font-size: 16px;\n    font-weight: 500;\n    line-height: 150%;\n  }\n\n  :hover {\n    background-color: ",";\n\n    p {\n      color: ",";\n    }\n\n    svg {\n      path {\n        fill: ",";\n      }\n    }\n  }\n"]);return _templateObject=function(){return e},e}let a=o.default.div.withConfig({componentId:"sc-76817606-0"})(_templateObject(),e=>{let{theme:n}=e;return n.colors.text.tertiary},e=>{let{theme:n}=e;return n.colors.text.accent.red},e=>{let{theme:n}=e;return n.colors.text.accent.red},e=>{let{theme:n}=e;return n.colors.background.grey.tertiary},e=>{let{theme:n}=e;return n.colors.text.accent.red},e=>{let{theme:n}=e;return n.colors.text.accent.red},e=>{let{theme:n}=e;return n.colors.text.primary},e=>{let{theme:n}=e;return n.colors.background.grey.tertiary},e=>{let{theme:n}=e;return n.colors.text.accent.blue},e=>{let{theme:n}=e;return n.colors.text.accent.blue});n.Z=function(e){let{svg:n,text:t,type:i="general",...o}=e;return(0,r.jsxs)(a,{className:"nes-pointer ".concat(i),...o,children:[n,(0,r.jsx)("p",{className:"dropdown-text",children:t})]})}},98017:function(e,n,t){t.d(n,{Z:function(){return FullPageEditor_EditorChoicePopup},X:function(){return N}});var i=t(82729),r=t(85893),o=t(19521),a=t(67294),l=t(11163),s=t(9473),c=t(609),d=t(66206),u=t(33846),p=t(45540),h=t(3649),m=t(47010);function _templateObject(){let e=(0,i._)(["\n  background: ",";\n  height: 72px;\n\n  .inner-container {\n    background: ",";\n    height: calc(100% - 4px);\n    padding: 16px;\n    display: flex;\n    justify-content: center;
1\n    align-items: center;\n    gap: 16px;\n\n    p {\n      margin: 0px;\n    }\n\n    .image-container,\n    .label {\n      display: flex;\n      justify-content: center;\n      align-items: center;\n    }\n\n    .image-container {\n      flex-shrink: 0;\n      img {\n        width: 32px;\n        height: 32px;\n      }\n    }\n\n    .label {\n      flex: 1;\n      display: flex;\n      justify-content: start;\n      align-items: center;\n      p {\n        width: 100%;\n        text-align: start;\n        color: ",";\n        font-size: 16px;\n        font-style: normal;\n        font-weight: 700;\n        line-height: 150%;\n      }\n    }\n  }\n\n  :hover {\n    transition-duration: 0.2s;\n    .inner-container {\n      transition-duration: 0.2s;\n      background: ",";\n    }\n  }\n"]);return _templateObject=function(){return e},e}let g=(0,o.default)(h.Z).withConfig({componentId:"sc-31d6a7b7-0"})(_templateObject(),e=>{let{theme:n}=e;return n.colors.background.grey.tertiary},e=>{let{theme:n}=e;return n.colors.background.grey.primary},e=>{let{theme:n}=e;return n.colors.text.primary},e=>{let{theme:n}=e;return n.colors.background.grey.secondary});var FullPageEditor_EditorSelector=function(e){let{editorDetails:n,createBuild:t,changeEditor:i,setCurrentLanguage:o,currentLanguage:l}=e,d=(0,s.v9)(c.o4)||"dark",u="dark"===d,p=l===n.type,[f,x]=(0,a.useState)(!1);return(0,r.jsx)(g,{className:"nes-pointer",borderColor:p?"14adff":u?"475569":"CBD5E1",style:{background:p?u?"#00568D":"#B6E4FF":""},onClick:()=>{o(n.type),i(),t({type:n.type}),x(!0)},children:(0,r.jsxs)(h.Z,{borderColor:p?"14adff":u?"475569":"CBD5E1",style:{background:p?u?"#042D4D":"#DEF1FF":""},className:"inner-container",children:[(0,r.jsx)("div",{className:"image-container",children:(0,r.jsx)("img",{src:n.logo,alt:n.label})}),(0,r.jsx)("div",{className:"label",children:f?(0,r.jsx)(m.Z,{color:"#52a5ff",size:12}):(0,r.jsx)("p",{children:n.label})})]})})},f=t(66492),x=t(86723),b=t(57194),v=t(73845),w=t(85673),y=t(72502),H=t(17596),V=t(43626),j=t(79044),k=t(5135),M=t(17717);function BuildStartMethod_templateObject(){let e=(0,i._)(["\n  * {\n    margin: 0px;\n  }\n\n  .selector-popup {\n    width: 722px;\n    height: fit-content;\n\n    .inner-popup-container {\n      display: flex;\n      flex-direction: column;\n      gap: 1.5rem;\n\n      .tags-wrapper {\n        display: flex;\n        justify-content: center;\n        gap: 12px;\n\n        svg {\n          path {\n            fill: ",";\n          }\n        }\n      }\n\n      .tools {\n        opacity: 0;\n      }\n\n      .inner-pixel-border-button-wrapper {\n        display: flex;\n        align-items: center;\n        gap: 16px;\n\n        .text {\n          display: flex;\n          flex-direction: column;\n          gap: 8px;\n\n          .title {\n            color: ",";\n            font-size: 16px;\n            font-weight: 700;\n            line-height: 140%;\n          }\n\n          .sub {\n            color: ",";\n            font-size: 14px;\n            font-style: normal;\n            font-weight: 600;\n            line-height: 140%; /* 19.6px */\n          }\n        }\n      }\n    }\n  }\n"]);return BuildStartMethod_templateObject=function(){return e},e}let C=(0,o.default)(y.Z).withConfig({componentId:"sc-aaf33428-0"})(BuildStartMethod_templateObject(),e=>{let{theme:n}=e;return n.colors.text.secondary},e=>{let{theme:n}=e;return n.colors.text.primary},e=>{let{theme:n}=e;return n.colors.text.tertiary}),Z=(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,r.jsx)("path",{d:"M6 20H18V16H20V22H4V16H6V20ZM18 16H6V14H18V16ZM15 12H9V10H15V12ZM9 10H7V4H9V10ZM17 10H15V4H17V10ZM15 4H9V2H15V4Z",fill:"black"})}),_=(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,r.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 3H16V7H22V21H2V7H8V3ZM10 7H14V5H10V7ZM4 9V19H20V9H4ZM8 11V17H6V11H8ZM18 11V17H16V11H18Z",fill:"black"})}),S=(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,r.jsx)("path",{d:"M9 4H15V2H17V4H21V22H3V4H7V2H9V4ZM5 20H19V10H5V20ZM9 18H7V16H9V18ZM13 18H11V16H13V18ZM17 18H15V16H17V18ZM9 14H7V12H9V14ZM13 14H11V12H13V14ZM17 14H15V12H17V14ZM5 8H19V6H5V8Z",fill:"black"})}),E=[{text:"Personal portfolio",prompt:"Build a personal portfolio to 
1showcase my projects",tag:"portfolio",icon:Z},{text:"Linktree clone",prompt:"Make a linktree clone with socials and a profile photo",tag:"linktree",icon:_},{text:"Habit tracker",prompt:"Create a habit tracker with daily streaks and progress",tag:"habit",icon:S}];var FullPageEditor_BuildStartMethod=function(e){let{onClose:n}=e,[t,i]=(0,a.useState)(""),[o,d]=(0,a.useState)(!1),u=(0,l.useRouter)(),h=(0,s.v9)(c.xp),g=(0,s.v9)(c.zr),x=new f.h,v=(0,a.useCallback)(async function(){d(!0);let e=await x.createBuild({uid:h});u.push("/@".concat(g,"/build/").concat(e))},[u,h,g]);async function genBuild(e){let n=await x.createBuild({uid:h});u.push("/@".concat(g,"/build/").concat(n,"?v=").concat(e,"&k=").concat(b.rd))}return(0,r.jsx)(C,{setShowModel:n,children:(0,r.jsxs)(p.Z,{className:"selector-popup",iconAction:n,children:[(0,r.jsx)(H.Z,{text:"What do you want to build?",avatarType:"lumi",state:"idle"}),(0,r.jsx)(V.Z,{prefilled:t,sideFunction:genBuild,forTemplateGen:!0,placeholder:"Describe your website idea, and I'll generate a starter template"}),(0,r.jsx)("div",{className:"tags-wrapper",children:E.map(e=>"language-teacher"===e.tag?null:(0,r.jsx)(j.Z,{tag:e.tag,isSelected:e.prompt===t,displayName:e.text,onToggle:()=>i(e.prompt),sideAction:()=>{},icon:e.icon},e.text))}),(0,r.jsx)(k.Z,{text:"OR"}),(0,r.jsx)(M.Z,{height:90,onClick:v,children:o?(0,r.jsx)(m.Z,{color:"#52a5ff",size:12}):(0,r.jsxs)(r.Fragment,{children:[" ",B,(0,r.jsxs)("div",{className:"text",children:[(0,r.jsx)("p",{className:"title",children:"Build from scratch"}),(0,r.jsx)("p",{className:"sub",children:"Start from a blank HTML/CSS/JS template"})]})]})})]})})};let B=(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,r.jsx)("path",{d:"M20 18H22V20H20V22H18V20H16V18H18V16H20V18ZM22 14H20V6H4V18H14V20H2V4H22V14ZM8 10H6V8H8V10ZM12 10H10V8H12V10ZM16 10H14V8H16V10Z",fill:"#94A3B8"})});function EditorChoicePopup_templateObject(){let e=(0,i._)(["\n    from {\n        transform: scale(0.8);\n        visibility: hidden;\n        opacity: 0;\n    } to {\n        transform: scale(1);\n        visibility: visible;\n        opacity: 1;\n    }\n"]);return EditorChoicePopup_templateObject=function(){return e},e}function _templateObject1(){let e=(0,i._)(['\n  z-index: 9999;\n  position: fixed;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  width: 100%;\n  height: 100%;\n  top: 0px;\n  left: 0px;\n  background: rgba(0, 0, 0, 0.5);\n  font-family: "Mulish", sans-serif;\n\n  .create-builds {\n    animation: '," 0.2s ease-in;\n    width: 548px;\n    height: 495px;\n    max-width: 95%;\n    max-height: 95%;\n    overflow: auto;\n\n    background: ",";\n\n    .copy-container {\n      display: flex;\n      flex-direction: column;\n      gap: 16px;\n\n      p,\n      h2 {\n        margin: 0px;\n      }\n\n      h2 {\n        color: ",";\n        text-align: center;\n        font-size: 24px;\n        font-style: normal;\n        font-weight: 700;\n        line-height: 150%;\n      }\n\n      p {\n        color: ",";\n        text-align: center;\n        font-size: 16px;\n        font-style: normal;\n        font-weight: 500;\n        line-height: 150%;\n      }\n    }\n\n    .selector-container {\n      margin-top: 24px;\n      display: grid;\n      grid-template-columns: repeat(2, 1fr);\n      gap: 12px;\n    }\n  }\n"]);return _templateObject1=function(){return e},e}let T=(0,o.keyframes)(EditorChoicePopup_templateObject()),O=o.default.div.withConfig({componentId:"sc-9f05ea21-0"})(_templateObject1(),T,e=>{let{theme:n}=e;return n.colors.background.grey.primary},e=>{let{theme:n}=e;return n.colors.text.primary},e=>{let{theme:n}=e;return n.colors.text.primary}),N=[{type:"python",label:"Python",logo:"/images/editor/python-pixel-logo.png"},{type:"html-css",label:"HTML/CSS/JS",logo:"/images/editor/html-pixel-logo.png"},{type:"java",label:"Java",logo:"/images/editor/java-pixel-logo.png"},{type:"javascript",label:"JavaScript",logo:"/images/editor/js-pixel-logo.png"},{type:"cpp",label:"C++",logo:"/images/editor/cpp-pixel-logo.png"},{type:"react",label:"React",logo:"/images/editor/react-pixel-logo.png"},{type:"csharp",label:"C#",logo:"/images/editor/csharp-pixel-logo.png"}];var FullPageEditor_EditorChoicePopup=function(e){let{setShowEditorSelector:n,showEditorSelector:t}=e,i=(0,v.T)(),o=(0,l.useRouter)(),h=(0,s.v9)(c.ot),m=(0,s.v9)(c.xp),g=(0,s.v9)(c.zr),y=(0,a.useRef)(null),[H,V]=(0,a.useState)(null),[j,k]=(0,a.useState)(!1),[M,C]=(0,a.useState)(!1),Z=(0,s.v9)(c.xF);new f.h,(0,a.useEffect)(()=>{function handleKeydown(e){"Escape"===e.key&&(e.preventDefault(),console.log("here"),n(!1))}return document.body.addEventListener("keydown",handleKeydown),()=>{document.body.removeEventListener("keydown",handleKeydown)}},[n]);let _=(0,a.useCallback)(function(){let e=o.pathname.split("/")[2]||"";if(e===H){n(!1);return}k(!0)},[o.pathname,n,H]),S=(0,a.useCallback)(async function(e){let{type:t}=e;if(h){var r;let e;
1if(null==o||null===(r=o.query)||void 0===r||r.build,k(!0),!Z){let e=await (0,x.Vv)({uid:m});if(e>b.QF){i((0,w.fz)({message:"Builds limit reached"})),n(!1);return}}if("html-css"==t){C(!0);return}e=await (0,d.W)({uid:m,type:t}),o.push("/@".concat(g,"/build/").concat(e)),k(!1),n(!1)}else o.push("/editor/".concat(t))},[h,o,n,m,g]);return((0,a.useEffect)(()=>{let{language:e}=o.query;if(!e||!h)return;let n=N.find(n=>n.type===e);n&&S({type:n.type})},[o.query,h,S]),(0,u.Z)(y,()=>{n(!1)}),M)?(0,r.jsx)(FullPageEditor_BuildStartMethod,{onClose:()=>{V(null),C(!1)}}):t?(0,r.jsx)(O,{children:(0,r.jsxs)(p.Z,{iconAction:()=>n(!1),className:"create-builds",children:[(0,r.jsxs)("div",{className:"copy-container",children:[(0,r.jsx)("h2",{children:"Create a new blank project"}),(0,r.jsx)("p",{children:"Select your editor:"})]}),(0,r.jsx)("div",{className:"selector-container",children:N.map(e=>(0,r.jsx)(FullPageEditor_EditorSelector,{editorDetails:e,createBuild:S,changeEditor:_,setCurrentLanguage:V,currentLanguage:H},e.type))})]})}):void 0}},99428:function(e,n,t){t.d(n,{Z:function(){return GlobalHeader}});var i=t(85893),r=t(67294),o=t(11163),a=t(82729),l=t(19521),s=t(92369),c=t(41664),d=t.n(c),u=t(45198),icons_Cross=function(e){let{fill:n="#020617",...t}=e;return(0,i.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:(0,i.jsx)("path",{d:"M7 19H5V17H7V19ZM19 19H17V17H19V19ZM9 15V17H7V15H9ZM17 17H15V15H17V17ZM11 15H9V13H11V15ZM15 15H13V13H15V15ZM13 13H11V11H13V13ZM11 11H9V9H11V11ZM15 11H13V9H15V11ZM9 9H7V7H9V9ZM17 9H15V7H17V9ZM7 7H5V5H7V7ZM19 7H17V5H19V7Z",fill:n})})},p=t(88090);function _templateObject(){let e=(0,a._)(["\n  position: fixed;\n  top: 0px;\n  left: 0px;\n  height: 40px;\n  width: 100%;\n  background-color: ",';\n  z-index: 12;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  gap: 1rem;\n\n  p {\n    margin: 0px;\n  }\n\n  .close-icon {\n    position: absolute;\n    right: 18px;\n    cursor: pointer;\n  }\n\n  .action {\n    font-family: "Mulish", sans-serif;\n    margin: 0px;\n    color: #fff;\n    font-weight: 700;\n  }\n\n  .code {\n    font-family: "Mulish", sans-serif;\n    font-weight: 500;\n    font-style: Medium;\n    font-size: ',"px;\n    leading-trim: NONE;\n    line-height: 150%;\n    letter-spacing: 0%;\n    text-align: center;\n    color: ",";\n\n    a {\n      color: ",";\n      text-decoration: underline;\n    }\n\n    "," {\n      display: flex;\n      flex-direction: column;\n      justify-content: center;\n      font-size: 13px;\n    }\n\n    "," {\n      display: inline-block;\n      font-size: 16px;\n    }\n  }\n"]);return _templateObject=function(){return e},e}let h=l.default.div.withConfig({componentId:"sc-97483517-0"})(_templateObject(),e=>{let{theme:n}=e;return n.colors.background.red.secondary},e=>{let{theme:n}=e;return n.fontSize.m},e=>{let{theme:n}=e;return n.colors.text.primary},e=>{let{theme:n}=e;return n.colors.text.accent.blue},e=>{let{theme:n}=e;return n.breakpoints.xs},e=>{let{theme:n}=e;return n.breakpoints.sm}),m=[...Object.values(p.E3.courseDetails).map(e=>e.courseUrl),"/winter-hackathon"];var globalheader_PaymentReminderButterBar=function(e){let{setShowPaymentReminder:n}=e,{width:t}=(0,u.i)(),a=(0,o.useRouter)(),s=(0,r.useContext)(l.ThemeContext),[c,p]=(0,r.useState)(!1);if((0,r.useEffect)(()=>{let e=m.some(e=>a.pathname.startsWith(e));p(e)},[null==a?void 0:a.pathname]),!c&&!(t<768))return(0,i.jsxs)(h,{children:[(0,i.jsxs)("p",{className:"code",children:["Something went wrong with your last payment. Please update your payment information to keep access to Club."," ",(0,i.jsx)(d(),{href:"/account?tabIndex=1",children:"Go to Billing"})]}),(0,i.jsx)(icons_Cross,{className:"nes-pointer close-icon",fill:s.colors.text.primary,onClick:()=>n(!1)})]})};function DeskTopHeaderContainer_templateObject(){let e=(0,a._)(["\n  position: fixed;\n  top: ",";\n  left: 0;\n  right: 0;\n  z-index: 9;\n  height: 62px;\n  border-bottom: 2px solid ",";\n\n  display: flex;\n  justify-content: center;\n\n  background-color: ",";\n\n  "," {\n    display: none;\n  }\n\n  "," {\n    display: none;\n    padding: 0px 24px;\n  }\n\n  "," {\n    display: flex;\n    padding: 0px 24px;\n  }\n\n  .inner-header-container {\n    display: flex;
1\n    align-items: center;\n    justify-content: space-between;\n    gap: ",";\n    width: ",";\n    max-width: ",";\n  }\n"]);return DeskTopHeaderContainer_templateObject=function(){return e},e}let g=l.default.div.withConfig({componentId:"sc-8b74ee47-0"})(DeskTopHeaderContainer_templateObject(),e=>{let{butterBarVisible:n}=e;return n?"40px":"0px"},e=>{let{theme:n}=e;return n.colors.border.grey.light},e=>{let{theme:n}=e;return n.colors.background.grey.primary},e=>{let{theme:n}=e;return n.breakpoints.xs},e=>{let{theme:n}=e;return n.breakpoints.sm},e=>{let{theme:n}=e;return n.breakpoints.md},e=>{let{learningEnv:n}=e;return"lumi"===n?"16px":"20px"},e=>{let{learningEnv:n}=e;return"general"===n?"1160px":"100vw"},e=>{let{learningEnv:n}=e;return"general"===n?"1210px":"100%"});var styles_DeskTopHeaderContainer=function(e){let{children:n,learningEnv:t="general",sql:o=!1}=e,[a,l]=(0,r.useState)(!1),[c,d]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=null;async function fetchSubscriptionStatus(){let{auth:n}=(0,s.UM)(),t=n.currentUser;if(!t){e&&clearTimeout(e),e=setTimeout(fetchSubscriptionStatus,5e3);return}try{let t=await fetch("/api/club/status");if(401===t.status){var i;null===(i=n.currentUser)||void 0===i||i.getIdToken(!0),e&&clearTimeout(e),e=setTimeout(fetchSubscriptionStatus,5e3);return}let r=await t.json();if("free"===r.status||"stripe"!==r.provider)return;"stripe"===r.provider&&"past_due"===r.subscriptionStatus&&d(!0)}catch(e){}}return fetchSubscriptionStatus(),()=>{e&&clearTimeout(e)}},[]),(0,i.jsxs)(i.Fragment,{children:[c&&(0,i.jsx)(globalheader_PaymentReminderButterBar,{setShowPaymentReminder:d}),(0,i.jsx)(g,{learningEnv:t,sql:o,butterBarVisible:c,id:"global-header",children:(0,i.jsx)("div",{className:"inner-header-container",children:n})})]})};function MobileHeaderStyles_templateObject(){let e=(0,a._)(["\n  position: fixed;\n  top: 0;\n  left: 0;\n  right: 0;\n  z-index: 9;\n  height: 62px;\n  border-bottom: 2px solid ",";\n\n  display: flex;\n  justify-content: center;\n  background-color: ",";\n\n  "," {\n    display: flex;\n    padding: 0px 0px;\n  }\n\n  "," {\n    display: flex;\n    padding: 0px 16px;\n  }\n\n  "," {\n    display: none;\n  }\n\n  .inner-header-container {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    width: 100%;\n    padding: 0rem 0.5rem;\n  }\n"]);return MobileHeaderStyles_templateObject=function(){return e},e}let f=l.default.div.withConfig({componentId:"sc-11d2c8dc-0"})(MobileHeaderStyles_templateObject(),e=>{let{theme:n}=e;return n.colors.border.grey.light},e=>{let{theme:n}=e;return n.colors.background.grey.primary},e=>{let{theme:n}=e;return n.breakpoints.xs},e=>{let{theme:n}=e;return n.breakpoints.sm},e=>{let{theme:n}=e;return n.breakpoints.md});var styles_MobileHeaderStyles=function(e){let{children:n,learningEnv:t="general",sql:r=!1}=e;return(0,i.jsx)(f,{learningEnv:t,sql:r,id:"mobile-global-header",children:(0,i.jsx)("div",{className:"inner-header-container",children:n})})},x=t(78590),b=t(9473),v=t(3649),w=t(62286),y=t.n(w),H=t(50037),V=t(43910),j=t(73845),k=t(76e3),M=t(609),C=t(41514),Z=t(61719);function HeaderProfileDropdown_templateObject(){let e=(0,a._)(["\n  position: absolute;\n  top: calc(6px + 100%);\n  right: 0%;\n  /* left: 50%;\n  transform: translate(-50%, 0%); */\n\n  animation: fadein 0.3s ease-in-out;\n  animation-fill-mode: forwards;\n  color: ",";\n\n  p {\n    margin: 0px;\n  }\n\n  .profile-dropdown {\n    width: 196px;\n    height: fit-content;\n    background-color: ",';\n    font-family: "Mulish", sans-serif;\n\n    padding: 8px 8px;\n    display: flex;\n    flex-direction: column;\n    gap: 5px;\n\n    .dropdown-item {\n      padding: 8px 12px;\n      transition: 0.2s;\n      border-radius: 4px;\n\n      a {\n        text-decoration: none;\n        color: inherit;\n      }\n\n      p,\n      a {\n        font-weight: 600;\n        font-feature-settings:\n          "liga" off,\n          "clig" off;\n\n        display: flex;\n        align-items: center;\n        gap: 12px;\n\n        span {\n          line-height: 1;
1\n\n          svg {\n            width: 20px;\n            height: 20px;\n\n            path {\n              fill: ',";\n            }\n          }\n        }\n      }\n\n      :hover {\n        background: ",";\n\n        color: ",";\n\n        svg {\n          path {\n            fill: ",";\n          }\n        }\n      }\n    }\n  }\n\n  @keyframes fadein {\n    0% {\n      margin-top: 1rem;\n      opacity: 0;\n    }\n\n    100% {\n      margin-top: 0rem;\n      opacity: 1;\n    }\n  }\n"]);return HeaderProfileDropdown_templateObject=function(){return e},e}let _=l.default.div.withConfig({componentId:"sc-8a1b83a3-0"})(HeaderProfileDropdown_templateObject(),e=>"dark"===e.theme.mode?"rgba(255, 255, 255, 0.87)":"black",e=>{let{theme:n}=e;return n.colors.background.grey.primary},e=>e.theme.colors.textTertiary,e=>e.theme.colors.backgroundHighlight,e=>e.theme.colors.highlightBlue,e=>e.theme.colors.highlightBlue);var headerProfile_HeaderProfileDropdown=function(){let e=(0,j.T)(),n=(0,b.v9)(M.o4)||"dark",t=(0,b.v9)(M.zr),o=(0,r.useCallback)(async function(){let{auth:n}=(0,s.UM)();try{(0,C.ed)(),(0,C.mr)(),localStorage.removeItem("photoURL"),localStorage.removeItem("username"),(0,H.xd)(),y().destroy(null,"hideGbClubbers"),y().destroy(null,"courseHistory");try{await fetch("/api/auth/sessionLogout",{method:"POST"})}catch(e){console.error("Error clearing session cookie:",e)}await (0,V.w7)(n),e((0,M.ix)()),document.location.reload()}catch(e){console.error(e)}},[e]),a=(0,r.useCallback)(()=>{let t="light"===n?"dark":"light";e((0,M.i5)({colorMode:t}))},[n,e]),l=(0,r.useMemo)(()=>[{icon:(0,i.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("g",{clipPath:"url(#clip0_825_12273)",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5007 1.66699H7.50065V3.33361H5.83419V8.33361H7.50085V3.33366H12.5007V1.66699ZM12.5007 8.33366H7.50065V10.0003H12.5007V8.33366ZM12.5009 3.33361H14.1675V8.33361H12.5009V3.33361ZM3.33398 13.3336H5.00065V11.667H15.0007V13.3337H5.00065V16.667H15.0008V13.3336H16.6675V18.3336H16.6673V18.3337H3.33398V18.3336V16.667V13.3336Z",fill:"#64748B"})}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"clip0_825_12273",children:(0,i.jsx)("rect",{width:"20",height:"20",fill:"white"})})})]}),internalName:"profile",displayName:"Profile",link:t?"/@".concat(t):"/home",function:void 0},{icon:(0,i.jsx)(Z.Z,{}),internalName:"bookmarks",displayName:"Bookmarks",link:"/bookmarks",function:void 0},{icon:(0,i.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.33366 3.3335H8.33366V5.8335H18.3337V7.50016H8.33366V10.0002H3.33366V7.50016H1.66699V5.8335H3.33366V3.3335ZM5.00033 5.00016V8.3335H6.66699V5.00016H5.00033ZM11.667 10.0002H16.667V12.5002H18.3337V14.1668H16.667V16.6668H11.667V14.1668H1.66699V12.5002H11.667V10.0002ZM13.3337 11.6668V15.0002H15.0003V11.6668H13.3337
1Z",fill:"#64748B"})}),internalName:"settings",displayName:"Account",link:"/account?tabIndex=0",function:void 0},{internalName:"dark-mode",displayName:"Switch theme",function:a,icon:"light"===n?(0,i.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("g",{clipPath:"url(#clip0_681_9546)",children:(0,i.jsx)("g",{clipPath:"url(#clip1_681_9546)",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13 0H11V4H13V0ZM0 11V13H4V11H0ZM24 11V13H20V11H24ZM13 24H11V20H13V24ZM8 6H16V8H8V6ZM6 8H8V16H6V8ZM8 18V16H16V18H8ZM18 16H16V8H18V16ZM20 2H22V4H20V2ZM20 4V6H18V4H20ZM22 22H20V20H22V22ZM20 20H18V18H20V20ZM4 2H2V4H4V6H6V4H4V2ZM2 22H4V20H6V18H4V20H2V22Z",fill:"#64748B"})})}),(0,i.jsxs)("defs",{children:[(0,i.jsx)("clipPath",{id:"clip0_681_9546",children:(0,i.jsx)("rect",{width:"24",height:"24",fill:"white"})}),(0,i.jsx)("clipPath",{id:"clip1_681_9546",children:(0,i.jsx)("rect",{width:"24",height:"24",fill:"white"})})]})]}):(0,i.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("g",{clipPath:"url(#clip0_681_6745)",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 2H14V4H12V6H10V4H6V2ZM4 6V4H6V6H4ZM4 16H2V6H4V16ZM6 18H4V16H6V18ZM8 20H6V18H8V20ZM18 20V22H8V20H18ZM20 18V20H18V18H20ZM18 14H20V18H22V10H20V12H18V14ZM12 14V16H18V14H12ZM10 12H12V14H10V12ZM10 12V6H8V12H10Z",fill:"#94A3B8"})}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"clip0_681_6745",children:(0,i.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]})},{icon:(0,i.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.16667 0.5H13.8333H15.5V2.16667V3.83333H13.8333V2.16667H2.16667V13.8333H13.8333V12.1667H15.5V13.8333V15.5H13.8333H2.16667H0.5V13.8333V2.16667V0.5H2.16667ZM15.5 7.16667H13.8333V5.5H12.1667V3.83333H10.5V5.5H12.1667V7.16667H3.83333V8.83333L12.1667 8.83333V10.5H10.5V12.1667H12.1667V10.5H13.8333V8.83333L15.5 8.83333V7.16667Z",fill:"#64748B"})}),internalName:"sign-out",displayName:"Sign Out",function:o}],[t,a,n,o]);return(0,i.jsx)(_,{children:(0,i.jsx)(v.Z,{className:"profile-dropdown",borderColor:"dark"===n?"475569":"CBD5E1",children:l.map(e=>(0,i.jsx)("div",{className:"dropdown-item nes-pointer",onClick:e.function?e.function:void 0,onMouseEnter:()=>{"profile"===e.internalName&&(0,k.lZ)({username:t})},children:e.link?(0,i.jsx)(d(),{href:e.link,children:(0,i.jsxs)("p",{children:[e.icon&&(0,i.jsx)("span",{children:e.icon}),e.displayName," "]})}):(0,i.jsxs)("p",{children:[e.icon&&(0,i.jsx)("span",{children:e.icon}),e.displayName," "]})},e.internalName))})})},S=t(33846);function HeaderProfileContainer_templateObject(){let e=(0,a._)(["\n  height: 100%;\n\n  .user-pfp-container {\n    position: relative;\n    display: flex;\n    align-items: center;\n    height: 100%;\n    transition: 0.2s;\n\n    .user-profile-image {\n      width: 40px;\n      height: 40px;\n      max-width: 40px;\n      border-radius: 40px;\n\n      border: 2px solid\n        ",";\n      transition: 0.4s;\n    }\n\n    :hover {\n      /* border-bottom: 2px solid\n        ","; */\n      .user-profile-image {\n        border: 2px solid\n          ",";\n      }\n    }\n  }\n"]);return HeaderProfileContainer_templateObject=function(){return e},e}let E=l.default.div.withConfig({componentId:"sc-eb75f888-0"})(HeaderProfileContainer_templateObject(),e=>"dark"===e.theme.mode?"#64748b":"#94A3B8",e=>"dark"===e.theme.mode?"#2cbaff":"#0080d4",e=>"dark"===e.theme.mode?"#2cbaff":"#0080d4");var headerProfile_HeaderProfileContainer=function(e){let{loggedIn:n}=e,t=localStorage.getItem("photoURL")||"",o=(0,r.useRef)(null),[a,l]=(0,r.useState)(!1);if((0,S.Z)(o,()=>l(!1)),n&&t)return(0,i.jsx)(E,{children:(0,i.jsxs)("div",{className:"user-pfp-container",ref:o,children:[(0,i.jsx)("img",{src:t,alt:"Login in user profile picture",className:"nes-pointer user-profile-image",onClick:()=>l(!a)}),a&&(0,i.jsx)("div",{children:(0,i.jsx)(headerProfile_HeaderProfileDropdown,{})})]})})},B=t(73857);
1function ActionButton_templateObject(){let e=(0,a._)(['\n  button {\n    font-family: "PixelGridS", sans-serif;\n    letter-spacing: 0.03rem;\n    outline: none;\n    width: fit-content;\n    height: 42px;\n    padding: 0px 16px;\n    background-color: #ca8a04;\n    border-image-outset: 0px;\n    border-image-repeat: stretch;\n    border-image-slice: 2;\n    border-image-width: 4px;\n    border-style: solid;\n    border-width: 0px;\n    border-image-source: ',';\n\n    position: relative;\n    clip-path: polygon(\n      4px 0px,\n      4px 2px,\n      2px 2px,\n      2px 4px,\n      0px 4px,\n      0px calc(100% - 4px),\n      2px calc(100% - 4px),\n      2px calc(100% - 2px),\n      4px calc(100% - 2px),\n      4px 100%,\n      calc(100% - 4px) 100%,\n      calc(100% - 4px) calc(100% - 2px),\n      calc(100% - 2px) calc(100% - 2px),\n      calc(100% - 2px) calc(100% - 4px),\n      100% calc(100% - 4px),\n      100% calc(100% - 4px),\n      100% 4px,\n      calc(100% - 2px) 4px,\n      calc(100% - 2px) 2px,\n      calc(100% - 4px) 2px,\n      calc(100% - 4px) 0px\n    );\n\n    ::after {\n      content: " ";\n      box-sizing: border-box;\n      background: #facc15;\n      width: 100%;\n      height: calc(100% - 4px);\n      z-index: -2;\n      left: 0px;\n      top: 0px;\n      padding: 16px 16px 20px 16px;\n      border: none;\n      font-size: 18px;\n      border-color: blue;\n      border-image-outset: 0px;\n      border-image-repeat: stretch;\n      border-image-slice: 2;\n      border-image-width: 4px;\n      border-style: solid;\n      border-width: 0px;\n      border-image-source: ',";\n      position: absolute;\n      clip-path: polygon(\n        4px 0px,\n        4px 2px,\n        2px 2px,\n        2px 4px,\n        0px 4px,\n        0px calc(100% - 4px),\n        2px calc(100% - 4px),\n        2px calc(100% - 2px),\n        4px calc(100% - 2px),\n        4px 100%,\n        calc(100% - 4px) 100%,\n        calc(100% - 4px) calc(100% - 2px),\n        calc(100% - 2px) calc(100% - 2px),\n        calc(100% - 2px) calc(100% - 4px),\n        100% calc(100% - 4px),\n        100% calc(100% - 4px),\n        100% 4px,\n        calc(100% - 2px) 4px,\n        calc(100% - 2px) 2px,\n        calc(100% - 4px) 2px,\n        calc(100% - 4px) 0px\n      );\n    }\n\n    :hover {\n      opacity: 0.9;\n    }\n  }\n\n  button:active {\n    ::after {\n      top: 2px;\n      height: calc(100% - 2px);\n    }\n  }\n"]);return ActionButton_templateObject=function(){return e},e}l.default.div.withConfig({componentId:"sc-712082b5-0"})(ActionButton_templateObject(),e=>{let{borderColor:n}=e;return"url(\"data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_183_5329)'%3E%3Cpath d='M2 0H3V1H2V0ZM3 0H4V1H3V0ZM1 1H2V2H1V1ZM4 1H5V2H4V1ZM0 2H1V3H0V2ZM5 2H6V3H5V2ZM0 3H1V4H0V3ZM5 3H6V4H5V3ZM1 4H2V5H1V4ZM4 4H5V5H4V4ZM2 5H3V6H2V5ZM3 5H4V6H3V5Z' fill='%23".concat(n,"'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_183_5329'%3E%3Crect width='6' height='6' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A\")")},e=>{let{borderColor:n}=e;return"url(\"data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_183_5329)'%3E%3Cpath d='M2 0H3V1H2V0ZM3 0H4V1H3V0ZM1 1H2V2H1V1ZM4 1H5V2H4V1ZM0 2H1V3H0V2ZM5 2H6V3H5V2ZM0 3H1V4H0V3ZM5 3H6V4H5V3ZM1 4H2V5H1V4ZM4 4H5V5H4V4ZM2 5H3V6H2V5ZM3 5H4V6H3V5Z' fill='%23".concat(n,"'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_183_5329'%3E%3Crect width='6' height='6' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A\")")});var Tabs_ActionButton=function(e){let{loggedIn:n,borderColor:t="A16207"}=e,[o,a]=(0,r.useState)(!0),[l,s]=(0,r.useState)("true"===localStorage.getItem("headercheck")),[c,u]=(0,r.useState)(0);if((0,r.useEffect)(()=>{!function checkHeader(){let e="true"===localStorage.getItem("headercheck");if(e)s(!0),a(!0);else{if(c>5)return;setTimeout(checkHeader,1e3),u(e=>e+1)}}()},[l,c,n]),(0,r.useEffect)(()=>{n&&!1===l&&a(!1),n||a(!1)},[l,n]),!n||!o)return(0,i.jsx)(d(),{href:n?"/pricing":"/signup",style:{all:"unset"}
1,children:(0,i.jsx)(B.Z,{variant:"yellow",size:"small",children:(0,i.jsx)("span",{children:n?"Join Club":"Sign up"})})})};function LinkTab_templateObject(){let e=(0,a._)(['\n  font-family: "Mulish", sans-serif;\n  height: 100%;\n  display: flex;\n  align-items: center;\n  transition: 0.2s;\n\n  border-bottom: 2px solid transparent;\n\n  &.current-path {\n    border-bottom: 2px solid #14adff;\n  }\n\n  button {\n    border: none;\n    outline: none;\n    padding: 0px;\n    margin: 0px;\n    background: none;\n    color: ',";\n    font-weight: 700;\n    padding: 8px 12px;\n    border-radius: 4px;\n  }\n\n  :hover {\n    button {\n      background: ",";\n\n      color: ",";\n    }\n\n    /* border-bottom: 2px solid #14adff; */\n  }\n"]);return LinkTab_templateObject=function(){return e},e}let T=l.default.div.withConfig({componentId:"sc-ff2e47bc-0"})(LinkTab_templateObject(),e=>"dark"===e.theme.mode?"rgba(255, 255, 255, 0.87)":"black",e=>e.theme.colors.backgroundHighlight,e=>e.theme.colors.highlightBlue);var Tabs_LinkTab=function(e){let{tabName:n,link:t="",func:r,showOnLogout:a=!0,showOnLogin:l=!0}=e,s=(0,o.useRouter)(),c=s.pathname.includes(n.toLowerCase());if(a&&l)return(0,i.jsx)(T,{className:c?"current-path":"",children:void 0===r?(0,i.jsx)(d(),{href:t,children:(0,i.jsx)("button",{children:n})}):(0,i.jsx)("button",{onClick:r?()=>r():void 0,children:n})})};function DropdownTab_templateObject(){let e=(0,a._)(['\n  font-family: "Mulish", sans-serif;\n  height: 100%;\n  display: flex;\n  align-items: center;\n  transition: 0.2s;\n  border-bottom: 2px solid transparent;\n  position: relative;\n\n  a {\n    text-decoration: none;\n  }\n\n  button {\n    border: none;\n    outline: none;\n    padding: 0px;\n    margin: 0px;\n    background: none;\n    color: ',";\n    font-weight: 700;\n    padding: 8px 12px;\n    border-radius: 4px;\n    display: flex;\n    gap: 8px;\n    z-index: 12;\n    position: relative;\n\n    .arrow-to-rotate {\n      transition: 0.4s;\n      line-height: 1.3;\n\n      svg {\n        path {\n          fill: ",";\n        }\n      }\n    }\n\n    .hover-gap-filler {\n      position: absolute;\n      top: 30%;\n      right: -20%;\n      height: 50px;\n    }\n  }\n\n  :hover {\n    button {\n      background: ",";\n\n      color: ",";\n\n      .arrow-to-rotate {\n        transform: rotate(180deg);\n\n        svg {\n          path {\n            fill: ",";\n          }\n        }\n      }\n    }\n\n    /* border-bottom: 2px solid #14adff; */\n  }\n\n  &.tab-current-path {\n    border-bottom: 2px solid #14adff;\n  }\n"]);return DropdownTab_templateObject=function(){return e},e}let O=l.default.div.withConfig({componentId:"sc-5ba23eb8-0"})(DropdownTab_templateObject(),e=>"dark"===e.theme.mode?"rgba(255, 255, 255, 0.87)":"black",e=>"dark"===e.theme.mode?"#CBD5E1":"#64748B",e=>e.theme.colors.backgroundHighlight,e=>e.theme.colors.highlightBlue,e=>e.theme.colors.highlightBlue);var Tabs_DropdownTab=function(e){let{tabName:n,DropDownComponent:t,hoverGapWidth:o=10,currentPath:a,defaultTabLink:l,gaStatus:s=!1}=e,[c,u]=(0,r.useState)(!1),[p,h]=(0,r.useState)(!1),m=(0,r.useRef)(null);(0,r.useEffect)(()=>(c?(m.current&&(clearTimeout(m.current),m.current=null),h(!0)):m.current=setTimeout(()=>{h(!1),m.current=null},300),()=>{m.current&&(clearTimeout(m.current),m.current=null)}),[c]);let g=(0,i.jsxs)("button",{className:"nes-pointer",children:[n,(0,i.jsx)("span",{className:"arrow-to-rotate",children:(0,i.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.83317 6.6665H4.1665V8.33317H5.83317V9.99984H7.49984V11.6665H9.1665V13.3332H10.8332V11.6665H12.4998V9.99984H14.1665V8.33317H15.8332V6.6665H14.1665V8.33317H12.4998V9.99984H10.8332V11.6665H9.1665V9.99984H7.49984V8.33317H5.83317V6.6665Z",fill:"#64748B"})})}),p&&(0,i.jsx)("div",{className:"hover-gap-filler",style:{width:o}})]});return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(O,{className:"".concat(a&&"tab-current-path"),onMouseEnter:()=>{m.current||u(!0)},onMouseLeave:()=>u(!1),style:{position:"Learn"===n?"static":"relative"},children:[l?(0,i.jsx)(d(),{href:l,children:g}):(0,i.jsx)(i.Fragment,{children:g}),p&&(0,i.jsx)("div",{style:{animation:c?"fadeIn 0.3s ease-in-out":"fadeOut 0.3s ease-in-out",zIndex:-1},children:t})]})})};
1function PracticeDropDown_templateObject(){let e=(0,a._)(["\n  position: absolute;\n  top: calc(6px + 100%);\n\n  left: 50%;\n  transform: translate(-50%, 0%);\n\n  animation: fadein 0.3s ease-in-out;\n  animation-fill-mode: forwards;\n  color: ",";\n\n  p {\n    margin: 0px;\n  }\n\n  .profile-dropdown {\n    width: 225px;\n    height: fit-content;\n    background-color: ",';\n    font-family: "Mulish", sans-serif;\n    padding: 0.75rem;\n    display: flex;\n    flex-direction: column;\n    gap: 8px;\n\n    .dropdown-item {\n      transition: 0.2s;\n      background-color: transparent;\n      padding: 8px 12px;\n      display: flex;\n      border-radius: 4px;\n      transition: 0.2s;\n\n      p {\n        font-weight: 600;\n        font-feature-settings:\n          "liga" off,\n          "clig" off;\n      }\n\n      :hover {\n        background: ',";\n\n        color: ",";\n      }\n    }\n\n    .current-path {\n      background: ",";\n\n      color: ",";\n    }\n  }\n\n  @keyframes fadein {\n    0% {\n      margin-top: 1rem;\n      opacity: 0;\n    }\n\n    100% {\n      margin-top: 0rem;\n      opacity: 1;\n    }\n  }\n  a {\n    all: unset;\n  }\n"]);return PracticeDropDown_templateObject=function(){return e},e}let N=l.default.div.withConfig({componentId:"sc-4b174619-0"})(PracticeDropDown_templateObject(),e=>"dark"===e.theme.mode?"rgba(255, 255, 255, 0.87)":"black",e=>{let{theme:n}=e;return n.colors.background.grey.primary},e=>e.theme.colors.backgroundHighlight,e=>e.theme.colors.highlightBlue,e=>e.theme.colors.backgroundHighlight,e=>e.theme.colors.highlightBlue);var dropDowns_PracticeDropDown=function(e){let{practiceLinks:n}=e,t=(0,o.useRouter)(),r=(0,b.v9)(M.o4)||"dark";return(0,i.jsx)(N,{children:(0,i.jsx)(v.Z,{className:"profile-dropdown",borderColor:"dark"===r?"475569":"CBD5E1",children:n.map(e=>(0,i.jsx)(d(),{href:e.link,children:(0,i.jsx)("div",{className:"dropdown-item nes-pointer ".concat(t.pathname.includes(e.link)&&"current-path"),children:(0,i.jsx)("p",{children:e.displayName})})},e.link))})})},D=t(62069);function LearnDropDown_templateObject(){let e=(0,a._)(["\n  position: absolute;\n  top: calc(100%);\n  left: 0px;\n  animation-fill-mode: forwards;\n  color: ",";\n\n  width: 100%;\n  height: fit-content;\n\n  // Fixes learn nav menu overflow to allow on vertically challenged screens\n  max-height: calc(100dvh - 62px);\n  overflow-y: auto;
1\n  overscroll-behavior: none;\n\n  border-bottom: 2px solid\n    ",";\n\n  background-color: ",';\n  font-family: "Mulish", sans-serif;\n  font-weight: 600;\n\n  animation: fadeIn 0.3s ease-in-out;\n  animation-fill-mode: forwards;\n\n  @keyframes fadeIn {\n    from {\n      opacity: 0;\n    }\n\n    to {\n      opacity: 1;\n    }\n  }\n\n  @keyframes fadeOut {\n    from {\n      opacity: 1;\n    }\n\n    to {\n      opacity: 0;\n    }\n  }\n\n  p {\n    margin: 0px;\n  }\n\n  .learn-dropdown-container {\n    padding: 32px 0px;\n    display: grid;\n    grid-template-columns: 2.5fr 4fr;\n\n    .recommended-container {\n      border-right: 1px solid\n        ',";\n      margin-right: 16px;\n\n      .title {\n        color: ",';\n\n        font-feature-settings:\n          "liga" off,\n          "clig" off;\n        font-size: 12px;\n        font-weight: 600;\n        line-height: 150%;\n        letter-spacing: 1.68px;\n        text-transform: uppercase;\n        margin-left: 11px;\n      }\n\n      .recommended-courses {\n        padding-top: 12px;\n        padding-right: 16px;\n\n        .course {\n          padding: 12px;\n          display: flex;\n          align-items: center;\n          gap: 1rem;\n          border-radius: 8px;\n\n          img {\n            transition-duration: 0.2s;\n            width: 48px;\n            height: 48px;\n            object-fit: cover;\n            border-radius: 4px;\n          }\n\n          .text-content {\n            p:first-child {\n              font-weight: 500;\n              color: #ffffff;\n              color: ',";\n            }\n\n            p:last-child {\n              color: ",";\n\n              font-weight: 500;\n            }\n          }\n\n          :hover {\n            background: ",";\n\n            .text-content {\n              p:first-child {\n                color: ",";\n              }\n            }\n          }\n        }\n      }\n\n      .all-courses-button {\n        width: 100%;\n        margin-top: 25px;\n        display: flex;\n        align-items: center;\n\n        svg {\n          margin-left: 8px;\n          margin-bottom: 4px;\n          filter: ",";\n\n          path {\n            fill: ",";\n          }\n        }\n      }\n    }\n\n    .tracks-container {\n      display: flex;\n      justify-content: space-between;\n      gap: 16px;\n\n      .track {\n        flex-grow: 1;\n        flex-basis: 0;\n        min-width: 0;\n\n        .title {\n          color: ",';\n          font-feature-settings:\n            "liga" off,\n            "clig" off;\n          font-size: 12px;\n          font-weight: 600;\n          line-height: 150%;\n          letter-spacing: 1.68px;\n          text-transform: uppercase;\n          margin-left: 12.5px;\n        }\n\n        .course-list {\n          padding-top: 12px;\n          display: flex;\n          flex-direction: column;\n          gap: 4px;\n\n          .individual-course {\n            padding: 8px 12px;\n            border-radius: 4px;\n            transition: 0.2;\n            display: flex;\n            align-items: center;\n            gap: 8px;\n\n            img {\n              width: 25px;\n              height: auto;\n              flex-shrink: 0;\n            }\n\n            .club-only-tag {\n              font-size: 12px;\n              font-style: normal;\n              font-weight: 900;\n              line-height: 150%;\n              letter-spacing: 0.6px;\n              background: linear-gradient(\n                242deg,\n                #a3e635 0%,\n                #2cbaff 33%,\n                #be53ff 66%,\n                #ff7286 100%\n              );\n              background-clip: text;\n              -webkit-background-clip: text;\n              -webkit-text-fill-color: transparent;\n            }\n\n            :hover {\n              background: ',";\n\n              color: ",";\n            }\n          }\n\n          .current-course-path {\n            background: ",";\n\n            color: ",";\n          }\n\n          .grey-out-link {\n            cursor: not-allowed;\n            color: ",";\n\n            :hover {\n              background: unset;\n              color: ",";\n            }\n          }\n        }\n      }\n    }\n  }\n"]);
1return LearnDropDown_templateObject=function(){return e},e}let L=l.default.div.withConfig({componentId:"sc-d210cfeb-0"})(LearnDropDown_templateObject(),e=>"dark"===e.theme.mode?"rgba(255, 255, 255, 0.87)":"black",e=>"dark"===e.theme.mode?"#334155":"#E2E8F0",e=>{let{theme:n}=e;return n.colors.background.grey.primary},e=>"dark"===e.theme.mode?"#334155":"#E2E8F0",e=>"dark"===e.theme.mode?"#94a3b8":"#64748B",e=>"dark"===e.theme.mode?"#ffffff":"#020617",e=>"dark"===e.theme.mode?"#cbd5e1":"#475569",e=>e.theme.colors.backgroundHighlight,e=>e.theme.colors.highlightBlue,e=>{let{theme:n}=e;return n.mode,"drop-shadow(0px 2px 0px #0080D4)"},e=>{let{theme:n}=e;return n.mode,"white"},e=>"dark"===e.theme.mode?"#94a3b8":"#64748B",e=>e.theme.colors.backgroundHighlight,e=>e.theme.colors.highlightBlue,e=>e.theme.colors.backgroundHighlight,e=>e.theme.colors.highlightBlue,e=>{let{theme:n}=e;return"dark"==n.mode?n.colors.palette.grey["500"]:n.colors.palette.grey["400"]},e=>{let{theme:n}=e;return"dark"==n.mode?n.colors.palette.grey["500"]:n.colors.palette.grey["400"]}),I=[{title:"Python",description:"Learn the basics of programming with beginner-friendly exercises.",imageUrl:"/images/python/nav-paython-image.png",link:"/python"},{title:"SQL",description:"Learn to store, query, and manage data in relational databases.",imageUrl:"/images/sql/seo-bannergif.gif",link:"/sql"}];var dropDowns_LearnDropDown=function(e){let{courses:n}=e,t=(0,o.useRouter)();return(0,i.jsx)(L,{children:(0,i.jsx)(D.Z,{children:(0,i.jsxs)("div",{className:"learn-dropdown-container",children:[(0,i.jsxs)("div",{className:"recommended-container",children:[(0,i.jsx)("p",{className:"title",children:"Recommended"}),(0,i.jsxs)("div",{className:"recommended-courses",children:[I.map(e=>(0,i.jsx)(d(),{href:e.link,style:{all:"unset"},children:(0,i.jsxs)("div",{className:"course nes-pointer",children:[(0,i.jsx)("img",{src:e.imageUrl,alt:"course-image"}),(0,i.jsxs)("div",{className:"text-content",children:[(0,i.jsx)("p",{children:e.title}),(0,i.jsx)("p",{children:e.description})]})]},e.title)},e.title)),(0,i.jsx)(d(),{href:"/courses",style:{all:"unset"},children:(0,i.jsxs)(B.Z,{variant:"blue",className:"all-courses-button nes-pointer",size:"small",children:[(0,i.jsx)("span",{children:"All Courses"}),(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.6665 15.8334L6.6665 14.1667L8.33317 14.1667L8.33317 15.8334L6.6665 15.8334ZM6.6665 4.16675L6.6665 5.83341L8.33317 5.83341L8.33317 4.16675L6.6665 4.16675ZM8.33317 5.83341L8.33317 7.50008L9.99984 7.50008L9.99984 5.83341L8.33317 5.83341ZM11.6665 9.16675L11.6665 7.50008L9.99984 7.50008L9.99984 9.16675L11.6665 9.16675ZM11.6665 10.8334L13.3332 10.8334L13.3332 9.16675L11.6665 9.16675L11.6665 10.8334ZM9.99984 12.5001L9.99984 10.8334L11.6665 10.8334L11.6665 12.5001L9.99984 12.5001ZM9.99984 12.5001L8.33317 12.5001L8.33317 14.1667L9.99984 14.1667L9.99984 12.5001Z",fill:"white"})})]})})]})]}),(0,i.jsx)("div",{className:"tracks-container",children:n.map(e=>{if(Array.isArray(e)){let n=e[0],r=e[1],o=e[2];return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:"track",children:[(0,i.jsx)("p",{className:"title",children:n.category}),(0,i.jsx)("div",{className:"course-list",children:e[0].courseList.map(e=>(0,i.jsx)(d(),{href:e.link,style:{all:"unset"},children:(0,i.jsx)("p",{className:"nes-pointer individual-course ".concat(t.pathname.includes(e.link)&&"current-course-path"),children:e.name})},e.link))}),(0,i.jsx)("p",{className:"title",style:{paddingTop:"2.15rem"},children:r.category}),(0,i.jsx)("div",{className:"course-list",children:e[1].courseList.map(e=>(0,i.jsx)(d(),{href:e.link,style:{all:"unset"},children:(0,i.jsxs)("p",{className:"nes-pointer individual-course ".concat(t.pathname.includes(e.link)&&"current-course-path"),children:[e.name,e.clubOnly&&(0,i.jsx)("span",{className:"club-only-tag",children:"CLUB"})]})},e.link))}),(0,i.jsx)("p",{className:"title",style:{paddingTop:"2.15rem"},children:o.category}),(0,i.jsx)("div",{className:"course-list",children:e[2].courseList.map(e=>(0,i.jsx)(d(),{href:e.link,style:{all:"unset"}
1,children:(0,i.jsxs)("p",{className:"nes-pointer individual-course ".concat(t.pathname.includes(e.link)&&"current-course-path"),children:[e.name,e.clubOnly&&(0,i.jsx)("span",{className:"club-only-tag",children:"CLUB"})]})},e.link))})]},n.category)})}return(0,i.jsxs)("div",{className:"track",children:[(0,i.jsx)("p",{className:"title",children:e.category}),(0,i.jsx)("div",{className:"course-list",children:e.courseList.map(e=>(0,i.jsx)(d(),{href:e.link,style:{all:"unset"},children:(0,i.jsxs)("p",{className:"nes-pointer individual-course ".concat(t.pathname.includes(e.link)&&"current-course-path"),children:[e.name," ",e.clubOnly&&(0,i.jsx)("span",{className:"club-only-tag",children:"CLUB"})]})},e.link))})]},e)})})]})})})},P=t(77265);function AnonDarkMode_templateObject(){let e=(0,a._)(["\n  height: 100%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  position: relative;\n\n  .icon-container {\n    padding: 8px;\n    margin: 0 -8px;\n    border-radius: 4px;\n    transition: 0.2s;\n\n    :hover {\n      background: ",";\n      color: ",";\n\n      svg {\n        path {\n          fill: ",";\n        }\n      }\n    }\n  }\n\n  .tooltip {\n    top: 55px;\n    position: absolute;\n    left: 50%;\n    transform: translateX(-50%);\n    width: 120px;\n    min-width: 0px;\n  }\n"]);return AnonDarkMode_templateObject=function(){return e},e}let F=l.default.div.withConfig({componentId:"sc-ed77110-0"})(AnonDarkMode_templateObject(),e=>{let{theme:n}=e;return n.colors.background.grey.tertiary},e=>e.theme.colors.highlightBlue,e=>{let{theme:n}=e;return n.colors.text.accent.blue});var Tabs_AnonDarkMode=function(e){let{loggedIn:n}=e,t=(0,j.T)(),o=(0,b.v9)(M.o4)||"dark",a=(0,r.useRef)(null),l=(0,P.lL)(),s=(0,r.useCallback)(()=>{let e="light"===o?"dark":"light";t((0,M.i5)({colorMode:e}))},[o,t]);if(!n)return(0,i.jsx)(F,{children:(0,i.jsx)("div",{className:"icon-container nes-pointer",ref:
1a,onClick:()=>s(),onMouseEnter:()=>{l.showTooltip("Switch Theme",a.current,"bottom")},onMouseLeave:()=>{l.hideTooltip()},children:"light"===o?(0,i.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("g",{clipPath:"url(#clip0_681_9546)",children:(0,i.jsx)("g",{clipPath:"url(#clip1_681_9546)",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13 0H11V4H13V0ZM0 11V13H4V11H0ZM24 11V13H20V11H24ZM13 24H11V20H13V24ZM8 6H16V8H8V6ZM6 8H8V16H6V8ZM8 18V16H16V18H8ZM18 16H16V8H18V16ZM20 2H22V4H20V2ZM20 4V6H18V4H20ZM22 22H20V20H22V22ZM20 20H18V18H20V20ZM4 2H2V4H4V6H6V4H4V2ZM2 22H4V20H6V18H4V20H2V22Z",fill:"#64748B"})})}),(0,i.jsxs)("defs",{children:[(0,i.jsx)("clipPath",{id:"clip0_681_9546",children:(0,i.jsx)("rect",{width:"24",height:"24",fill:"white"})}),(0,i.jsx)("clipPath",{id:"clip1_681_9546",children:(0,i.jsx)("rect",{width:"24",height:"24",fill:"white"})})]})]}):(0,i.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("g",{clipPath:"url(#clip0_681_6745)",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 2H14V4H12V6H10V4H6V2ZM4 6V4H6V6H4ZM4 16H2V6H4V16ZM6 18H4V16H6V18ZM8 20H6V18H8V20ZM18 20V22H8V20H18ZM20 18V20H18V18H20ZM18 14H20V18H22V10H20V12H18V14ZM12 14V16H18V14H12ZM10 12H12V14H10V12ZM10 12V6H8V12H10Z",fill:"#94A3B8"})}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"clip0_681_6745",children:(0,i.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]})})})},A=t(31875);function CommunityDropDown_templateObject(){let e=(0,a._)(["\n  position: absolute;\n  top: calc(6px + 100%);\n\n  left: 50%;\n  transform: translate(-50%, 0%);\n\n  animation: fadein 0.3s ease-in-out;\n  animation-fill-mode: forwards;\n  color: ",";\n\n  p {\n    margin: 0px;\n  }\n\n  .profile-dropdown {\n    width: 225px;\n    height: fit-content;\n    background-color: ",';\n    font-family: "Mulish", sans-serif;\n    padding: 0.75rem;\n    display: flex;\n    flex-direction: column;\n    gap: 8px;\n\n    .dropdown-item {\n      transition: 0.2s;\n      background-color: transparent;\n      padding: 8px 12px;\n      display: flex;\n      border-radius: 4px;\n      transition: 0.2s;\n\n      p {\n        font-weight: 600;\n        font-feature-settings:\n          "liga" off,\n          "clig" off;\n      }\n\n      :hover {\n        background: ',";\n\n        color: ",";\n      }\n    }\n\n    .current-path {\n      background: ",";\n\n      color: ",";\n    }\n  }\n\n  @keyframes fadein {\n    0% {\n      margin-top: 1rem;\n      opacity: 0;\n    }\n\n    100% {\n      margin-top: 0rem;\n      opacity: 1;\n    }\n  }\n  a {\n    all: unset;\n  }\n"]);return CommunityDropDown_templateObject=function(){return e},e}let R=l.default.div.withConfig({componentId:"sc-8707424-0"})(CommunityDropDown_templateObject(),e=>"dark"===e.theme.mode?"rgba(255, 255, 255, 0.87)":"black",e=>{let{theme:n}=e;return n.colors.background.grey.primary},e=>e.theme.colors.backgroundHighlight,e=>e.theme.colors.highlightBlue,e=>e.theme.colors.backgroundHighlight,e=>e.theme.colors.highlightBlue);var dropDowns_CommunityDropDown=function(e){let{links:n}=e,t=(0,o.useRouter)(),r=(0,b.v9)(M.o4)||"dark";return(0,i.jsx)(R,{children:(0,i.jsx)(v.Z,{className:"profile-dropdown",borderColor:"dark"===r?"475569":"CBD5E1",children:n.map(e=>(0,i.jsx)(d(),{href:e.link,children:(0,i.jsx)("div",{className:"dropdown-item nes-pointer ".concat(t.pathname===e.link&&"current-path"),children:(0,i.jsx)("p",{children:e.displayName})})},e.link))})})},U=t(44898),z=t(53835),J=t(50528),W=t(26070);function LumiNavTitle_templateObject(){let e=(0,a._)(['\n  font-family: "Mulish", sans-serif;\n  display: flex;\n  align-items: center;\n  gap: 8px;\n\n  p {\n    margin: 0px;\n  }\n\n  .chat-name {\n    color: ',";\n    margin: 0px;\n    font-size: 16px;\n    font-style: normal;\n    font-weight: 700;\n    line-height: 150%;\n    display: flex;\n    gap: 8px;\n\n    .lumi-nav-link {\n      background: none;\n      border: none;\n      padding: 0;\n      cursor: pointer;\n      color: ",";\n      font-weight: 600;\n\n      :hover {\n        text-decoration: underline;\n      }\n      :focus {\n        outline: none;\n        box-shadow: none;\n      }\n    }\n\n    .slash {\n      color: ",";\n    }\n  }\n\n  .icon-wrapper {\n    position: relative;\n\n    .icon {\n      width: 22px;\n      height: 22px;\n      border-radius: 4px;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n      padding: 2px;\n      position: relative;\n\n      svg {\n        path {\n          fill: ",";\n        }\n      }\n\n      :hover {\n        background-color: ",";\n      }\n    }\n  }\n"]);
1return LumiNavTitle_templateObject=function(){return e},e}let q=l.default.div.withConfig({componentId:"sc-4a3e0d9a-0"})(LumiNavTitle_templateObject(),e=>{let{theme:n}=e;return n.colors.text.primary},e=>{let{theme:n}=e;return n.colors.text.tertiary},e=>{let{theme:n}=e;return n.colors.text.tertiary},e=>{let{theme:n}=e;return n.colors.text.tertiary},e=>{let{theme:n}=e;return n.colors.background.grey.hovershadow}),G=(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"4",viewBox:"0 0 14 4",fill:"none",children:[(0,i.jsx)("path",{d:"M0 0H3.33333V3.33333H0V0Z",fill:"#94A3B8"}),(0,i.jsx)("path",{d:"M5 0H8.33333V3.33333H5V0Z",fill:"#94A3B8"}),(0,i.jsx)("path",{d:"M13.3333 0H10V3.33333H13.3333V0Z",fill:"#94A3B8"})]});var dedicated_lumi_LumiNavTitle=function(){let e=(0,b.v9)(J.X2),[n,t]=(0,r.useState)(!1),a=(0,r.useRef)(),l=(0,j.T)(),s=(0,o.useRouter)();return(0,S.Z)(a,()=>{t(!1)}),(0,i.jsxs)(q,{className:"nav-container-links",children:[e?(0,i.jsxs)("div",{className:"chat-name",children:[(0,i.jsx)("button",{className:"lumi-nav-link nes-pointer",onClick:function(){l((0,J.OV)()),s.push("/lumi")},type:"button",children:"Lumi ⋆˙⟡"}),(0,i.jsx)("span",{className:"slash",children:"/"}),(0,i.jsx)("span",{children:e})]}):(0,i.jsx)("p",{className:"chat-name",children:"Lumi ⋆˙⟡"}),e&&(0,i.jsxs)("div",{className:"icon-wrapper",ref:a,children:[(0,i.jsx)("p",{className:"icon nes-pointer",onClick:()=>t(!n),children:G}),n&&(0,i.jsx)(W.Z,{})]})]})},Y=t(52069);function ConnectionStatus_templateObject(){let e=(0,a._)(["\n  from { transform: rotate(0deg); }\n  to { transform: rotate(360deg); }\n"]);return ConnectionStatus_templateObject=function(){return e},e}function _templateObject1(){let e=(0,a._)(['\n  padding: 6px 12px;\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  border-radius: 1000px;\n  font-family: "Mulish", sans-serif;\n  font-size: 14px;\n  font-style: normal;\n  font-weight: 600;\n  line-height: normal;\n  transition:\n    width 0.5s ease-in-out,\n    background-color 0.7s ease;\n  white-space: nowrap;\n  overflow: hidden;\n\n  * {\n    margin: 0px;\n  }\n\n  &.connecting {\n    background-color: ',";\n    color: ",";\n\n    svg {\n      animation: "," 1s linear infinite;\n    }\n  }\n\n  &.connected {\n    background-color: ",";\n    color: ",";\n    width: 191.5px;\n\n    .connected-dot {\n      flex-shrink: 0;\n      width: 12px;\n      height: 12px;\n      border-radius: 50%;\n      background-color: ",";\n    }\n  }\n\n  &.dot-only {\n    background-color: transparent;\n    color: transparent;\n    width: 12px;\n  }\n\n  &.offline,\n  &.error {\n    color: ",";\n    background-color: ",";\n\n    svg {\n      path {\n        fill: ",";\n      }\n    }\n  }\n"]);return _templateObject1=function(){return e},e}let X=(0,l.keyframes)(ConnectionStatus_templateObject()),Q=l.default.div.withConfig({componentId:"sc-67808e62-0"})(_templateObject1(),e=>{let{theme:n}=e;return n.colors.background.grey.secondary},e=>{let{theme:n}=e;return n.colors.text.secondary},X,e=>{let{theme:n}=e;return n.colors.background.green.secondary},e=>{let{theme:n}=e;return n.colors.text.accent.green},e=>{let{theme:n}=e;return"light"==n.mode?n.colors.palette.green["500"]:n.colors.palette.green["600"]},e=>{let{theme:n}=e;return n.colors.text.accent.red},e=>{let{theme:n}=e;return n.colors.background.red.secondary},e=>{let{theme:n}=e;return n.colors.text.accent.red});var codeEditor_ConnectionStatus=function(){let e=(0,b.v9)(Y.X$),[n,t]=(0,r.useState)("connecting"),[o,a]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e=setTimeout(()=>t("connected"),1500),n=setTimeout(()=>a(!0),3500);return()=>{clearTimeout(e),clearTimeout(n)}},[]),(0,r.useEffect)(()=>{"disconnected"!=e&&"connecting"!=e&&t(e),("error"===e||"offline"===e)&&a(!1)},[e]);let l={connecting:{text:"Connecting...",icon:K},connected:{text:"Connected to Cod\xe9dex",icon:(0,i.jsx)("div",{className:"connected-dot"})},offline:{text:"No internet connection. Please connect to internet and refresh.",icon:$},error:{text:"We're experiencing issues. See terminal for more information.",icon:$}},s=l[n];function handleMouseEnter(e){"connected"==n&&a(e)}return(0,i.jsxs)(Q,{className:"".concat(n," ").concat(o&&"dot-only"," nes-pointer"),onMouseEnter:()=>handleMouseEnter(!1),onMouseLeave:()=>handleMouseEnter(!0),children:[null==s?void 0:s.icon," ",null==s?void 0:s.text]})};let K=(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,i.jsx)("path",{d:"M12 6C12 4.74154 11.6043 3.51493 10.8689 2.49372C10.1335 1.4725 9.09555 0.708375 7.90199 0.309444C6.70843 -0.0894869 5.41965 -0.103026 4.21798 0.270742C3.0163 0.644511 1.96257 1.38666 1.20586 2.3922C0.449144 3.39775 0.0277621 4.61577 0.00132417 5.87395C-0.0251137 7.13214 0.344731 8.36678 1.05854 9.40322C1.77234 10.4397 2.79397 11.2254 3.97888 11.6493C5.16379 12.0733 6.45201 12.1139 7.66127 11.7654L7.12723 9.91206C6.3067 10.1485 5.4326 10.1209 4.62859 9.83329C3.82459 9.54565 3.13137 9.01248 2.64703 8.30922C2.16269 7.60595 1.91173 6.7682 1.92967 5.91447C1.94761 5.06075 2.23354 4.23427 2.74699 3.55198C3.26045 2.86968 3.97545 2.3661 4.79083 2.11248C5.60621 1.85887 6.4807 1.86805 7.29057 2.13874C8.10045 2.40943 8.80471 2.92792 9.30372 3.62085C9.80273 4.31379 10.0712 5.14609 10.0712 6H12Z",fill:"#64748B"})}),$=(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,i.jsx)("path",{d:"M17 21H7V19H17V21ZM7 19H5V17H7V19ZM19 19H17V17H19V19ZM5 17H3V7H5V17ZM13 17H11V15H13V17ZM21 17H19V7H21V17ZM13 13H11V7H13V13ZM7 7H5V5H7V7ZM19 7H17V5H19V7ZM17 5H7V3H17V5Z",fill:"#9F1239"})});var ee=t(36138),en=t(50823),et=t(86807),ei=t(72502),er=t(45540),eo=t(99281),ea=t(9098),el=t(85673),es=t(89547);
1function BuildsShareModel_templateObject(){let e=(0,a._)(["\n  .builds-share-model {\n    width: 670px;\n    height: fit-content;\n\n    .header {\n      margin-bottom: 24px;\n      display: flex;\n      flex-direction: column;\n      align-items: center;\n      gap: 16px;\n\n      h2 {\n        color: ",";\n        font-size: 24px;\n        font-weight: 700;\n        line-height: 150%;\n      }\n\n      p {\n        color: ",";\n        font-size: 16px;\n        font-style: normal;\n        font-weight: 500;\n        line-height: 150%; /* 24px */\n      }\n    }\n\n    .tabs-wrapper {\n      display: flex;\n      flex-direction: column;\n      gap: 16px;\n    }\n  }\n"]);return BuildsShareModel_templateObject=function(){return e},e}function BuildsShareModel_templateObject1(){let e=(0,a._)(["\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n\n  label {\n    color: ",";\n    font-size: 16px;\n    font-weight: 700;\n    line-height: 150%;\n  }\n\n  .link-wrapper {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n\n    .dynamic-input {\n      flex: 1;\n    }\n  }\n"]);return BuildsShareModel_templateObject1=function(){return e},e}let ec=(0,l.default)(ei.Z).withConfig({componentId:"sc-c9c40b59-0"})(BuildsShareModel_templateObject(),e=>{let{theme:n}=e;return n.colors.text.primary},e=>{let{theme:n}=e;return n.colors.text.secondary}),ed=new Set(["html-css-js","html-css"]),eu=l.default.div.withConfig({componentId:"sc-c9c40b59-1"})(BuildsShareModel_templateObject1(),e=>{let{theme:n}=e;return n.colors.text.primary});function CopyTab(e){let{label:n,link:t}=e,r=(0,j.T)();return(0,i.jsxs)(eu,{children:[(0,i.jsx)("label",{children:n}),(0,i.jsxs)("div",{className:"link-wrapper",children:[(0,i.jsx)(eo.Z,{value:t,readOnly:!0,setValue:()=>{}}),(0,i.jsxs)(B.Z,{onClick:function(){navigator.clipboard.writeText(t),r((0,el.fz)({message:"Link copied to clipboard",type:"success"}))},children:[(0,i.jsx)(ea.Z,{})," Copy"]})]})]})}var popups_BuildsShareModel=function(e){let{closeModel:n,buildType:t}
1=e,r=(0,b.v9)(Y.SG),o=(0,es.AC)(r);return(0,i.jsx)(ec,{setShowModel:n,children:(0,i.jsxs)(er.Z,{className:"builds-share-model",iconAction:n,children:[(0,i.jsxs)("div",{className:"header",children:[(0,i.jsx)("h2",{children:"Share this Build"}),(0,i.jsx)("p",{children:"Anyone with these links can view your project, but only you can make edits."})]}),(0,i.jsxs)("div",{className:"tabs-wrapper",children:[ed.has(t)&&(0,i.jsx)(CopyTab,{label:"Live site",link:o}),(0,i.jsx)(CopyTab,{label:"Code",link:window.location.href})]})]})})},ep=t(52317),eh=t(62660),em=t(37585),eg=t(16244),ef=t(83782);function BuildsNameUpdate_templateObject(){let e=(0,a._)(["\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n\n  label {\n    color: ",";\n    font-size: 16px;\n    font-weight: 700;\n    line-height: 150%;\n  }\n\n  .name-exists {\n    margin-top: -4px;\n    display: flex;\n    align-items: center;\n    gap: 8px;\n\n    svg {\n      path,\n      rect {\n        fill: ",";\n      }\n    }\n\n    p {\n      color: ",";\n      font-size: 14px;\n      font-weight: 500;\n      line-height: 150%;\n    }\n  }\n"]);return BuildsNameUpdate_templateObject=function(){return e},e}let ex=l.default.div.withConfig({componentId:"sc-1b2b7d93-0"})(BuildsNameUpdate_templateObject(),e=>{let{theme:n}=e;return n.colors.text.primary},e=>{let{theme:n}=e;return n.colors.text.accent.red},e=>{let{theme:n}=e;return n.colors.text.accent.red});var settings_BuildsNameUpdate=function(e){let{buildId:n,title:t,handleSideEffect:o}=e,a=(0,b.v9)(M.zr),[l,s]=(0,r.useState)(t),[c,d]=(0,r.useState)("none"),{checkSlugTitleExists:u}=(0,eh.kz)({buildId:n,username:a});return(0,eg.Z)((0,r.useCallback)(async()=>{if(!l||l===t){d("none");return}if(!em.y.hasUsableSlug(l)){d("invalid");return}d(await u(l)?"taken":"none")},[l,u,t]),500),(0,i.jsxs)(ex,{children:[(0,i.jsx)("label",{children:"Build name"}),(0,i.jsx)(eo.Z,{value:l,setValue:e=>{s(e),d("none"),o({key:"buildName",value:e===t?null:e})},placeholder:"Project name"}),"taken"===c&&(0,i.jsxs)("div",{className:"name-exists",children:[(0,i.jsx)(ef.Z,{}),(0,i.jsx)("p",{children:"Build name already exists"})]}),"invalid"===c&&(0,i.jsxs)("div",{className:"name-exists",children:[(0,i.jsx)(ef.Z,{}),(0,i.jsx)("p",{children:"Name must include a letter or number"})]})]})};function BuildsSettingsSelector_templateObject(){let e=(0,a._)(["\n  * {\n    margin: 0px;\n  }\n\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n\n  .copy-wrapper {\n    display: flex;\n    flex-direction: column;\n    gap: 8px;\n\n    label {\n      color: ",";\n      font-size: 16px;\n      font-style: normal;\n      font-weight: 700;\n      line-height: 150%;\n    }\n\n    p {\n      color: ",";\n      font-size: 14px;\n      font-weight: 500;\n      line-height: 150%;\n    }\n  }\n  .radio-wrapper {\n    display: grid;\n    grid-template-columns: 1fr 1fr;\n    gap: 12px;\n  }\n"]);return BuildsSettingsSelector_templateObject=function(){return e},e}let eb=l.default.div.withConfig({componentId:"sc-c24c4460-0"})(BuildsSettingsSelector_templateObject(),e=>{let{theme:n}=e;return n.colors.text.primary},e=>{let{theme:n}=e;return n.colors.text.primary});var settings_BuildsSettingsSelector=function(e){let{labelCopy:n,subCopy:t,buttons:r}=e;return(0,i.jsxs)(eb,{children:[(0,i.jsxs)("div",{className:"copy-wrapper",children:[(0,i.jsx)("label",{children:n}),(0,i.jsx)("p",{children:t})]}),(0,i.jsx)("div",{className:"radio-wrapper",children:r})]})},ev=t(31505),settings_GeneralOptions=function(e){var n,t,o,a;let{buildObject:l,updates:s,handleSideEffect:c,handleFieldUpdate:d}=e,[u,p]=(0,r.useState)(null===(o=null!==(t=null==s?void 0:null===(n=s.fieldUpdates)||void 0===n?void 0:n.canRemix)&&void 0!==t?t:null==l?void 0:l.canRemix)||void 0===o||o);function handleRemix(e){let{allow:n}=e;p(n),d({key:"canRemix",value:n})}return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(settings_BuildsNameUpdate,{buildId:null==l?void 0:l.id,title:(null==l?void 0:l.title)===(null==l?void 0:l.id)?"":null!==(a=null==l?void 0:l.title)&&void 0!==a?a:"",handleSideEffect:c}),(0,i.jsx)(settings_BuildsSettingsSelector,{labelCopy:"Remixing",subCopy:"Let others make a copy of your build code under their account.",buttons:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ev.Z,{copy:"On",checked:u,onClick:()=>handleRemix({allow:!0})}),(0,i.jsx)(ev.Z,{copy:"Off",checked:!u,onClick:()=>handleRemix({allow:!1})})]})})]})},ew=t(78327);
1function CustomDomainUpdate_templateObject(){let e=(0,a._)(["\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n\n  label {\n    color: ",";\n    font-size: 16px;\n    font-weight: 700;\n    line-height: 150%;\n  }\n\n  .sub-copy {\n    margin-top: -4px;\n    color: ",";\n    font-size: 14px;\n    font-weight: 500;\n    line-height: 150%;\n  }\n\n  .name-exists {\n    margin-top: -4px;\n    display: flex;\n    align-items: center;\n    gap: 8px;\n\n    svg {\n      path,\n      rect {\n        fill: ",";\n      }\n    }\n\n    p {\n      color: ",";\n      font-size: 14px;\n      font-weight: 500;\n      line-height: 150%;\n    }\n  }\n\n  .available {\n    svg {\n      path,\n      rect {\n        fill: ",";\n      }\n    }\n\n    p {\n      color: ",";\n    }\n  }\n"]);return CustomDomainUpdate_templateObject=function(){return e},e}let ey=l.default.div.withConfig({componentId:"sc-6452f91d-0"})(CustomDomainUpdate_templateObject(),e=>{let{theme:n}=e;return n.colors.text.primary},e=>{let{theme:n}=e;return n.colors.text.tertiary},e=>{let{theme:n}=e;return n.colors.text.accent.red},e=>{let{theme:n}=e;return n.colors.text.accent.red},e=>{let{theme:n}=e;return n.colors.text.accent.green},e=>{let{theme:n}=e;return n.colors.text.accent.green});var settings_CustomDomainUpdate=function(e){let{buildId:n,domain:t,handleSideEffect:o}=e,a=(0,b.v9)(M.zr),{checkSubdomainAvailability:l}=(0,ew.u)({buildId:n,username:a}),[s,c]=(0,r.useState)(t),[d,u]=(0,r.useState)(!1),[p,h]=(0,r.useState)(!1);return(0,eg.Z)((0,r.useCallback)(async()=>{if(!s||s===t){o({key:"domainUpdate",value:null});return}let e=await l(s);e.available?(o({key:"domainUpdate",value:s}),h(!0)):(o({key:"domainUpdate",value:null}),u(!0))},[s,t,l,o]),500),(0,i.jsxs)(ey,{children:[(0,i.jsx)("label",{children:"Live site Url"}),(0,i.jsx)("p",{className:"sub-copy",children:"Customize the URL your project is hosted at."}),(0,i.jsx)(eo.Z,{value:s,setValue:e=>{let n=e.replace(/[^a-zA-Z0-9-]/g,"");c(n),u(!1),h(!1)},placeholder:"Project name",ghostPlaceholder:".codedex.me"}),d&&(0,i.jsxs)("div",{className:"name-exists",children:[(0,i.jsx)(ef.Z,{}),(0,i.jsx)("p",{children:"Build name already exists"})]}),p&&(0,i.jsxs)("div",{className:"name-exists available",children:[eH,(0,i.jsx)("p",{children:"This URL is available!"})]})]})};let eH=(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"9",viewBox:"0 0 12 9",fill:"none",children:(0,i.jsx)("path",{d:"M4.24316 9H2.82812V7.5H4.24316V9ZM2.82812 7.5H1.41406V6H2.82812V7.5ZM5.65723 6V7.5H4.24316V6H5.65723ZM1.41406 6H0V4.5H1.41406V6ZM7.07129 6H5.65723V4.5H7.07129V6ZM8.48535 4.5H7.07129V3H8.48535V4.5ZM9.90039 3H8.48535V1.5H9.90039V3ZM11.3145 1.5H9.90039V0H11.3145V1.5Z",fill:"#3F6212"})});function LiveSiteLink_templateObject(){let e=(0,a._)(["\n  padding: 16px;\n  border-radius: 4px;\n  border: 2px solid ",";\n  background-color: ",";\n\n  p {\n    color: ",";\n    font-size: 16px;\n    font-weight: 700;\n    line-height: 150%;\n  }\n\n  a {\n    color: ",";\n    font-size: 16px;\n    font-weight: 700;\n    line-height: 150%;\n  }\n\n  button {\n    margin-top: 12px;\n\n    svg {\n      path {\n        fill: ",";\n      }\n    }\n  }\n"]);return LiveSiteLink_templateObject=function(){return e},e}let eV=l.default.div.withConfig({componentId:"sc-99cb1e60-0"})(LiveSiteLink_templateObject(),e=>{let{theme:n}=e;return n.colors.background.blue.tertiary},e=>{let{theme:n}=e;return n.colors.background.blue.primary},e=>{let{theme:n}=e;return n.colors.text.primary},e=>{let{theme:n}=e;return n.colors.text.accent.blue},e=>{let{theme:n}=e;return n.colors.text.primary});var settings_LiveSiteLink=function(e){let{domain:n}=e,t=(0,b.v9)(Y.SG),r=(0,es.AC)(t);return(0,i.jsxs)(eV,{children:[(0,i.jsx)("p",{children:"Your site is live at"}),(0,i.jsx)(d(),{href:r,target:"_blank",children:r.replace("https://","")}),(0,i.jsx)(d(),{href:r,target:"_blank",style:{textDecoration:"none"},children:(0,i.jsxs)(B.Z,{size:"small",variant:"subtle",children:["Visit live site"," ",(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",children:(0,i.jsx)("path",{d:"M6.66699 3.33301H1.66699V13.333H11.667V8.33301H13.333V15H0V1.66699H6.66699V3.33301ZM6.66699 10H5V8.33301H6.66699V10ZM8.33301 8.33301H6.66699V6.66699H8.33301V8.33301ZM10 6.66699H8.33301V5H10V6.66699ZM15 6.66699H13.333V3.33301H11.667V1.66699H8.33301V0H15V6.66699ZM11.667 5H10V3.33301H11.667V5Z",fill:"#020617"})})]})})]})},settings_LiveOptions=function(e){var n,t,o,a,l,s,c;let{buildObject:d,updates:u,handleSideEffect:p,handleFieldUpdate:h}=e,[m,g]=(0,r.useState)(null!==(a=null!==(o=null==u?void 0:null===(n=u.fieldUpdates)||void 0===n?void 0:n.logoPlacement)&&void 0!==o?o:null==d?void 0:d.logoPlacement)&&void 0!==a?a:"bottom-right");function handlePlacement(e){let{placement:n}=e;g(n),h({key:"logoPlacement",value:n})}let f=null!==(s=null!==(l=null==u?void 0:null===(t=u.sideEffects)||void 0===t?void 0:t.domainUpdate)&&void 0!==l?l:null==d?void 0:d.subdomainSlug)&&void 0!==s?s:null==d?void 0:d.id;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(settings_LiveSiteLink,{domain:null!==(c=null==d?void 0:d.slugTitle)&&void 0!==c?c:null==d?void 0:d.id}),(0,i.jsx)(settings_CustomDomainUpdate,{buildId:null==d?void 0:d.id,domain:f,handleSideEffect:p}),(0,i.jsx)(settings_BuildsSettingsSelector,{labelCopy:"Logo placement",subCopy:"Choose where the watermark appears on your project.",buttons:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ev.Z,{copy:"Top left",checked:"top-left"==m,onClick:()=>handlePlacement({placement:"top-left"})}),(0,i.jsx)(ev.Z,{copy:"Top right",checked:"top-right"==m,onClick:()=>handlePlacement({placement:"top-right"})}),(0,i.jsx)(ev.Z,{copy:"Bottom left",checked:"bottom-left"==m,onClick:()=>handlePlacement({placement:"bottom-left"})}),(0,i.jsx)(ev.Z,{copy:"Bottom right",checked:"bottom-right"===m,onClick:()=>handlePlacement({placement:"bottom-right"})})]})})]})};
1function BuildsSettingsModel_templateObject(){let e=(0,a._)(["\n  .builds-settings-model {\n    width: 817px;\n    height: 652px;\n    padding-bottom: 0px;\n\n    .inner-popup-container {\n      padding-top: 20px;\n      height: 100%;\n      display: flex;\n      flex-direction: column;\n      padding-bottom: 0px;\n      min-height: 0;\n\n      .main-settings-wrapper {\n        height: inherit;\n        display: flex;\n        gap: 24px;\n        min-height: 0;\n\n        .nav-wrapper {\n          width: 240px;\n          padding: 10px;\n          height: fit-content;\n        }\n\n        .settings-options-wrapper {\n          flex: 1;\n          display: flex;\n          flex-direction: column;\n          gap: 32px;\n          overflow: auto;\n          padding-bottom: 2rem;\n        }\n      }\n\n      .btn-wrapper {\n        margin: 0px -32px;\n        border-top: 2px solid ",";\n        display: flex;\n        justify-content: end;\n        padding: 12px 32px 14px 32px;\n      }\n    }\n  }\n"]);return BuildsSettingsModel_templateObject=function(){return e},e}let ej=(0,l.default)(ei.Z).withConfig({componentId:"sc-8fe03e-0"})(BuildsSettingsModel_templateObject(),e=>{let{theme:n}=e;return n.colors.border.grey.light});var settings_BuildsSettingsModel=function(e){let{buildObject:n,closeModel:t}=e,a=(0,o.useRouter)(),l=(0,j.T)(),s=(0,b.v9)(M.xF),c=(0,b.v9)(M.zr),[d,u]=(0,r.useState)("general"),{updateBuildTitle:p,updateBuildFields:h}=(0,eh.kz)({buildId:null==n?void 0:n.id,username:c}),{setSubdomainSlug:m}=(0,ew.u)({buildId:null==n?void 0:n.id,username:c}),[g,f]=(0,r.useState)({sideEffects:{},fieldUpdates:{}});function handleTabSwitch(e){let{tab:n}=e;f({sideEffects:{},fieldUpdates:{}}),u(n)}let x=(0,r.useCallback)(e=>{let{key:n,value:t}=e;f(e=>({...e,sideEffects:{...e.sideEffects,[n]:t}}))},[]),w=(0,r.useCallback)(e=>{let{key:n,value:t}=e;f(e=>({...e,fieldUpdates:{...e.fieldUpdates,[n]:t}}))},[]);async function handleSaveSettings(){let{sideEffects:e,fieldUpdates:n}=g;if(e.buildName){if(!em.y.hasUsableSlug(e.buildName)){l((0,el.fz)({message:"The name must include a letter or number"}));return}let n=await p(e.buildName);if(n){l((0,Y.ok)(e.buildName));let n=em.y.generateSlugTitle(e.buildName);a.replace("/".concat(a.query.username,"/build/").concat(n))}else{l((0,el.fz)({message:"That name is already taken"}));return}}if(e.domainUpdate){let n=await m(e.domainUpdate);if(n.success)l((0,Y.us)(e.domainUpdate));else{let e="error"in n&&"taken"===n.error?"That URL is already taken":"Could not update live site URL";l((0,el.fz)({message:e}));return}}h(n),l((0,el.fz)({message:"Settings updated"}))}return(0,i.jsx)(ej,{setShowModel:t,children:(0,i.jsxs)(er.Z,{className:"builds-settings-model",headerTitle:"Build settings",iconAction:t,children:[(0,i.jsxs)("div",{className:"main-settings-wrapper",children:[(0,i.jsxs)(v.Z,{className:"nav-wrapper",children:[(0,i.jsx)(ep.Z,{copy:"General",icon:(0,i.jsx)(et.Z,{}),isActive:"general"===d,action:()=>handleTabSwitch({tab:"general"})}),s&&"html-css-js"==n.type&&(0,i.jsx)(ep.Z,{copy:"Live site",icon:(0,i.jsx)(et.Z,{}),isActive:"live-site"===d,action:()=>handleTabSwitch({tab:"live-site"})})]}),(0,i.jsx)("div",{className:"settings-options-wrapper",children:"general"===d?(0,i.jsx)(settings_GeneralOptions,{buildObject:n,handleSideEffect:x,handleFieldUpdate:w,updates:g}):(0,i.jsx)(settings_LiveOptions,{buildObject:n,handleSideEffect:x,handleFieldUpdate:w,updates:g})})]}),(0,i.jsx)("div",{className:"btn-wrapper",onClick:()=>handleSaveSettings(),children:(0,i.jsx)(B.Z,{children:"Save Changes"})})]})})},ek=t(66081);function BuildNavItems_templateObject(){let e=(0,a._)(["\n  margin-right: 12px;\n  display: flex;\n  align-items: center;\n  gap: 16px;\n\n  button {\n    svg {\n      margin-right: 8px;\n    }\n  }\n"]);return BuildNavItems_templateObject=function(){return e},e}let eM=l.default.div.withConfig({componentId:"sc-779ace14-0"})(BuildNavItems_templateObject()),eC="small";var builds_BuildNavItems=function(e){let{buildObject:n}=e,t=(0,b.v9)(M.f8),[o,a]=(0,r.useState)(null);function closeModel(){a(null)}let l={share:(0,i.jsx)(popups_BuildsShareModel,{closeModel:closeModel,buildType:n.type}),settings:(0,i.jsx)(settings_BuildsSettingsModel,{buildObject:n,closeModel:closeModel}),remix:(0,i.jsx)(ek.Z,{buildId:n.id,buildTitle:n.title,onClose:closeModel})};return(0,i.jsxs)(i.Fragment,{children:[o&&l[o],(0,i.jsxs)(eM,{children:[n.uid===t&&(0,i.jsxs)(B.Z,{size:eC,variant:"subtle",onClick:()=>a("settings"),children:[(0,i.jsx)(et.Z,{}),"Settings"]}),t&&(!1!==n.canRemix||n.uid===t)&&(0,i.jsxs)(B.Z,{size:eC,variant:"subtle",onClick:()=>a("remix"),children:[(0,i.jsx)(en.Z,{}),"Remix"]}),(0,i.jsxs)(B.Z,{size:eC,variant:"yellow",onClick:()=>a("share"),children:[(0,i.jsx)(ee.Z,{}),"Share"]})]})]})},eZ=t(36326);
1function TabsContainer_templateObject(){let e=(0,a._)(["\n  height: 100%;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  width: 100%;\n\n  .nav-container-links {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n    height: inherit;\n\n    .icon-container {\n      padding: 8px;\n      border-radius: 4px;\n      transition: 0.2s;\n\n      svg {\n        path {\n          fill: ",";\n        }\n      }\n\n      :hover {\n        background: ",";\n        color: ",";\n\n        svg {\n          path {\n            fill: ",";\n          }\n        }\n      }\n    }\n  }\n\n  .nav-user-actions {\n    display: flex;\n    align-items: center;\n    gap: 28px;\n  }\n"]);return TabsContainer_templateObject=function(){return e},e}let e_=l.default.div.withConfig({componentId:"sc-eb546baf-0"})(TabsContainer_templateObject(),e=>{let{theme:n}=e;return n.colors.text.tertiary},e=>{let{theme:n}=e;return n.colors.background.grey.tertiary},e=>e.theme.colors.highlightBlue,e=>{let{theme:n}=e;return n.colors.text.accent.blue});var Tabs_TabsContainer=function(e){let{setActions:n,courses:t,inCourseLE:a,buildObject:s=null,render:c="general"}=e,[u,p]=(0,r.useState)(!1);(0,r.useContext)(l.ThemeContext);let h=(0,r.useRef)(null),m=(0,P.lL)(),g=(0,o.useRouter)(),[f,x]=(0,r.useState)(localStorage.getItem("photoURL")||"");(0,r.useEffect)(()=>{function handleStorageChange(){x(localStorage.getItem("photoURL")||"")}return window.addEventListener("storage",handleStorageChange),()=>{window.removeEventListener("storage",handleStorageChange)}},[]);let b=(0,r.useMemo)(()=>[{link:"/challenges",displayName:"Challenge Packs"},{link:"/projects",displayName:"Project Tutorials"},{link:"/lumi",displayName:"Lumi Bot ⋆˙⟡"}],[]),v=(0,r.useMemo)(()=>[{link:"/community",displayName:"Home"},{link:"/community/leaderboards",displayName:"Leaderboard"},{link:"/community/project-showcase",displayName:"Project Showcase"},{link:"/community/monthly-challenge",displayName:"Monthly Challenge"},{link:"/community/30-nites-of-code",displayName:"#30NitesOfCode"},{link:"/worlds",displayName:"Worlds"},{link:"/blog",displayName:"Blog"}],[]),w=(0,r.useMemo)(()=>t.some(e=>Array.isArray(e)?e[0].courseList.concat(e[1].courseList).some(e=>g.pathname.startsWith(e.link)):e.courseList.some(e=>g.pathname.startsWith(e.link))),[t,g.pathname]),y=(0,r.useMemo)(()=>b.some(e=>g.pathname.startsWith(e.link)),[b,g.pathname]),H=(0,r.useMemo)(()=>v.some(e=>g.pathname.startsWith(e.link)),[v,g.pathname]);if(s)return(0,i.jsxs)(e_,{style:{justifyContent:a?"end":"space-between"},children:[(0,i.jsx)(builds_BuildNavItems,{buildObject:s}),(0,i.jsxs)("div",{className:"nav-user-actions",children:[f&&(0,i.jsx)(A.Z,{loggedIn:f,inCourseLE:a}),(0,i.jsx)(headerProfile_HeaderProfileContainer,{loggedIn:f}),(0,i.jsx)(Tabs_AnonDarkMode,{loggedIn:f}),!f&&(0,i.jsx)(Tabs_ActionButton,{loggedIn:f})]})]});let V={general:(0,i.jsxs)("div",{className:"nav-container-links",children:[(0,i.jsx)(Tabs_DropdownTab,{tabName:"Learn",DropDownComponent:(0,i.jsx)(dropDowns_LearnDropDown,{courses:t}),hoverGapWidth:350,currentPath:w,defaultTabLink:"/courses"}),(0,i.jsx)(Tabs_DropdownTab,{tabName:"Practice",DropDownComponent:(0,i.jsx)(dropDowns_PracticeDropDown,{practiceLinks:b}),hoverGapWidth:150,currentPath:y}),(0,i.jsx)(Tabs_LinkTab,{tabName:"Build",link:"/builds"}),(0,i.jsx)(Tabs_DropdownTab,{tabName:"Community",DropDownComponent:(0,i.jsx)(dropDowns_CommunityDropDown,{links:v}),hoverGapWidth:150,currentPath:H,defaultTabLink:"/community"}),(0,i.jsx)(Tabs_LinkTab,{tabName:"Pricing",link:"/pricing",showOnLogout:!f})]}),course:(0,i.jsx)("div",{className:"nav-container-links",children:(0,i.jsx)(d(),{className:"icon-container nes-pointer",ref:h,onMouseEnter:()=>{m.showTooltip("Report a bug",h.current,"bottom")},onMouseLeave:()=>{m.hideTooltip()},href:eZ.n.bugReport,target:"_blank",children:(0,i.jsx)(z.Z,{})})}),lumi:(0,i.jsx)(dedicated_lumi_LumiNavTitle,{})};return(0,i.jsxs)(e_,{style:{justifyContent:a?"end":"space-between",gap:"course"===c?"20px":"8px"},children:[a&&(0,i.jsx)(codeEditor_ConnectionStatus,{}),V["community"===c?"general":c],(0,i.jsxs)("div",{className:"nav-user-actions",children:[(0,i.jsx)(U.Z,{inCourseLE:a,disableSearchToggle:"lumi"===c}),(0,i.jsx)(A.Z,{loggedIn:f,inCourseLE:a}),(0,i.jsx)(headerProfile_HeaderProfileContainer,{loggedIn:f}),(0,i.jsx)(Tabs_AnonDarkMode,{loggedIn:f}),(0,i.jsx)(Tabs_ActionButton,{loggedIn:f})]})]})},eS=t(36473),eE=t(98017);let eB=[{category:"DATA SCIENCE",column:1,courseList:[{name:"Python",link:"/python"},{name:"Intermediate Python",link:"/intermediate-python",clubOnly:!0},{name:"NumPy",link:"/numpy"},{name:"SQL",link:"/sql"},{name:"GenAI",link:"/gen-ai"},{name:"Pandas",link:"/pandas"},{name:"Matplotlib",link:"/matplotlib"},{name:"Machine Learning",link:"/machine-learning",clubOnly:!0}]},{category:"WEB DEVELOPMENT",column:2,courseList:[{name:"HTML",link:"/html"},{name:"CSS",link:"/css"},{name:"JavaScript",link:"/javascript"},{name:"Intermediate JavaScript",link:"/intermediate-javascript",clubOnly:!0},{name:"React",link:"/react"},{name:"Node.js",link:"/nodejs",clubOnly:!0},{name:"p5.js",link:"/p5js"}]},[{category:"TOOLS",column:3,courseList:[{name:"Command Line",link:"/command-line"},{name:"Git & GitHub",link:"/git-github"},{name:"GitHub Copilot",link:"/github-copilot"},{name:"UI/UX Design",link:"/ui-ux-design"}]},{category:"Computer Science",column:3,courseList:[{name:"C++",link:"/cpp"},{name:"C#",link:"/c-sharp"},{name:"Java",link:"/java"},{name:"Data Structures & Algorithms",link:"/data-structures-and-algorithms",clubOnly:!0}]},{category:"GAME DEVELOPMENT",column:1,courseList:[{name:"Phaser",link:"/phaser"},{name:"Lua",link:"/lua"}]}]];function GlobalHeader(e){let{learningEnv:n="general",sql:t=!1,showBuildPopup:a=0,buildObject:l="",showBuildShareBtn:s=!1,username:c="",exerciseInfo:d={},dailyChallengeTitle:u=null}=e,p=(0,o.useRouter)(),[h,m]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{a>0&&m(!0)},[a]),(0,r.useEffect)(()=>{async function getNews(){let e=sessionStorage.getItem("cachedTechNews");if(!e)try{let e=await fetch("/api/community/getTechNews"),n=await e.json();sessionStorage.setItem("cachedTechNews",JSON.stringify(n.events))}catch(e){console.log("error fetching opc carousal posts")}}async function getEvents(){let e=sessionStorage.getItem("cachedUpcomingEvents");if(!e)try{let e=await fetch("/api/getEvents"),n=await e.json(),t=n.events.sort((e,n)=>e.order-n.order);sessionStorage.setItem("cachedUpcomingEvents",JSON.stringify(t))}catch(e){console.log("error fetching opc carousal posts")}}p.pathname.includes("community")||(getNews(),getEvents())},[p]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eE.Z,{showEditorSelector:h,setShowEditorSelector:m}),(0,i.jsxs)(styles_DeskTopHeaderContainer,{learningEnv:n,children:[(0,i.jsx)(x.Z,{buildObject:l,username:c,exerciseInfo:d,dailyChallengeTitle:u,learningEnv:n}
1),(0,i.jsx)(Tabs_TabsContainer,{setActions:{editorPopup:m},courses:eB,inCourseLE:"general"!=n&&"community"!=n&&"lumi"!=n,buildObject:l,render:n})]}),(0,i.jsxs)(styles_MobileHeaderStyles,{children:[(0,i.jsx)(x.Z,{exerciseInfo:d,learningEnv:n}),(0,i.jsx)(eS.Z,{})]}),(0,i.jsx)("div",{style:{position:"fixed",top:"-20rem",fontSize:"12px",opacity:"0"},children:eB.map(e=>Array.isArray(e)?(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)("div",{children:e[0].courseList.map(e=>(0,i.jsx)("a",{href:e.link,children:e.name},e.name))}),(0,i.jsx)("div",{children:e[1].courseList.map(e=>(0,i.jsx)("a",{href:e.link,children:e.name},e.name))},e[1].category+Math.random())]},Math.random()):(0,i.jsx)("div",{children:e.courseList.map(e=>(0,i.jsx)("a",{href:e.link,children:e.name},e.name))},e.category))})]})}},76e3:function(e,n,t){t.d(n,{lZ:function(){return saveProfileToSess}});async function saveProfileToSess(e){let{username:n}=e,t="@".concat(n),i=sessionStorage.getItem("userprofiles"),r=JSON.parse(i);if(r||(r={}),r[t])return null;let o=await fetch("/api/fullUserProfile",{method:"POST",body:JSON.stringify({username:t})}),a=await o.json();"fail"!=a.status&&(r[t]=a,sessionStorage.setItem("userprofiles",JSON.stringify(r)))}},66206:function(e,n,t){t.d(n,{W:function(){return createUserBuild}});var i=t(39828),r=t(92369);async function createUserBuild(e){let n,{uid:t,type:o}=e,a={uid:t,code:"",title:"",public:!1,invited:[],created:new Date,updated:new Date,type:o},{firestore:l}=(0,r.UM)();for(let e=1;e<=3;e++)try{let e=await (0,i.ET)((0,i.hJ)(l,"userBuilds"),a),n=(0,i.JU)((0,i.hJ)(l,"userBuilds"),e.id);return await (0,i.r7)(n,{slugTitle:e.id,title:e.id,lowercaseId:e.id.toLowerCase()}),e.id}catch(e){n=e,console.error(e)}throw n}},86723:function(e,n,t){t.d(n,{BY:function(){return getBuilds},Vv:function(){return getBuildCount}});var i=t(39828),r=t(92369);async function getBuilds(e){let{uid:n}=e,{firestore:t}=(0,r.UM)(),o=(0,i.hJ)(t,"userBuilds"),a=await (0,i.PL)((0,i.IO)(o,(0,i.ar)("uid","==",n),(0,i.Xo)("updated","desc"))),l=a.docs.map(e=>({id:e.id,...e.data()}));return l}async function getBuildCount(e){let{uid:n}=e,{firestore:t}=(0,r.UM)(),o=(0,i.hJ)(t,"userBuilds"),a=await (0,i.Yp)((0,i.IO)(o,(0,i.ar)("uid","==",n)));return a.data().count}},66492:function(e,n,t){t.d(n,{h:function(){return HtmlCssJsFirebaseService}});var i=t(39828),r=t(92369),o=t(98170);let BuildAccessControl=class BuildAccessControl{canView(e){return!0}canEdit(e){if(!e)return!1;if(this.build.uid===e)return!0;let n=this.build.invited.find(n=>n.uid===e);return(null==n?void 0:n.access)==="edit"}canDelete(e){return e===this.build.uid}canChangePrivacy(e){return e===this.build.uid}canInviteUsers(e){return e===this.build.uid}getAccessLevel(e){if(!e)return this.build.public?"view":"none";if(this.build.uid===e)return"owner";let n=this.build.invited.find(n=>n.uid===e);return n?n.access:this.build.public?"view":"none"}constructor(e){this.build=e}};var a=t(52646),l=t(37585);let HtmlCssJsFirebaseService=class HtmlCssJsFirebaseService{get db(){return(0,r.UM)().firestore}getFilesCollection(e){return(0,i.hJ)(this.db,"userBuilds",e,"files")}async loadFiles(e){let n=await (0,i.PL)(this.getFilesCollection(e)),t={};return n.docs.forEach(e=>{let n=e.data();t[n.path]=n}),t}async batchWriteFiles(e,n){let t=(0,i.qs)(this.db),r=this.getFilesCollection(e);for(let[e,o]of Object.entries(n)){let n=l.y.pathToDocId(e);t.set((0,i.JU)(r,n),{code:o.code,path:o.path,readOnly:o.readOnly||!1})}await t.commit()}async createBuild(e){let{uid:n,userTier:t,isPublic:r=!1,initialFiles:a}=e,l=o.Z.createNewBuild(n,"",t,a),s=await (0,i.ET)((0,i.hJ)(this.db,"userBuilds"),{uid:n,title:"",slugTitle:"",type:"html-css-js",metadata:l.metadata,public:r,invited:[],remixCount:0,created:(0,i.Bt)(),updated:(0,i.Bt)()}),c=s.id;try{return await (0,i.r7)(s,{id:c,title:c,slugTitle:c,lowercaseId:c.toLowerCase()}),await this.batchWriteFiles(c,l.files),await fetch("/api/builds/setSubdomainSlug",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({buildId:c,slug:c.toLowerCase()})}),c}catch(e){throw console.error("Error creating build:",e),e}}async getUserBuilds(e){let n=(0,i.IO)((0,i.hJ)(this.db,"userBuilds"),(0,i.ar)("uid","==",e),(0,i.ar)("type","in",["html-css","html-css-js"]),(0,i.Xo)("updated","desc")),t=await (0,i.PL)(n);return t.docs.map(e=>({id:e.id,...e.data(),type:"html-css-js",files:{}}))}async getBuildBySlug(e,n,t){try{let l;e=e.replace(/^@/,"");let s=(0,i.IO)((0,i.hJ)(this.db,"users"),(0,i.ar)("uniqueUsername","==",e.toLowerCase())),c=await (0,i.PL)(s);if(c.empty)return null;let d=c.docs[0].data(),u=(0,i.IO)((0,i.hJ)(this.db,"userBuilds"),(0,i.ar)("slugTitle","==",n),(0,i.ar)("uid","==",d.uid)),p=await (0,i.PL)(u);if(p.empty)return null;let h=p.docs[0].data(),m=p.docs[0].id,g=new BuildAccessControl(h),f=g.canView(t||null),x=g.canEdit(t||null);if("html-css"===h.type&&h.code){var r,o,a;let e=h.code,n={"/index.html":{code:null!==(r=e.html)&&void 0!==r?r:"",path:"/index.html",readOnly:!1},"/style.css":{code:null!==(o=e.css)&&void 0!==o?o:"",path:"/style.css",readOnly:!1},"/script.js":{code:null!==(a=e.javascript)&&void 0!==a?a:"",path:"/script.js",readOnly:!1}},t={...h,id:m};l={...t,type:"html-css-js",metadata:{totalFiles:3,totalDirectories:0,directories:{}},files:n}}else{let e={...h,id:m},n=f&&["html-css-js","html-css"].includes(h.type)?await this.loadFiles(m):{};l={...e,files:n}}return{build:l,canView:f,canEdit:x}}catch(e){return console.error("Error getting build:",e),null}}async saveBuild(e,n,t){try{let r=(0,i.JU)(this.db,"userBuilds",e),o=await (0,i.QT)(r);if(!o.exists())throw Error("Build not found");let a=o.data(),s=new BuildAccessControl(a);if(!s.canEdit(t))throw Error("Unauthorized: Cannot edit this build");let c=await this.loadFiles(e),d=(0,i.qs)(this.db),u=this.getFilesCollection(e);for(let e of Object.keys(c))if(!(e in n)){let n=l.y.pathToDocId(e);d.delete((0,i.JU)(u,n))}for(let[e,t]of Object.entries(n)){let n=c[e];if(!n||n.code!==t.code||(n.readOnly||!1)!==(t.readOnly||!1)){let n=l.y.pathToDocId(e);d.set((0,i.JU)(u,n),{code:t.code,path:t.path,readOnly:t.readOnly||!1})}}return d.update(r,{updated:(0,i.Bt)()}),await d.commit(),!0}catch(e){return console.error("Error saving build:",e),!1}}async deleteFile(e,n,t){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"free";try{let o=(0,i.JU)(this.db,"userBuilds",e),s=await (0,i.QT)(o);if(!s.exists())return{success:!1,error:"Build not found"};let c=s.data(),d=new BuildAccessControl(c);if(!d.canEdit(t))return{success:!1,error:"Unauthorized: Cannot edit this build"};let u=n.startsWith("/")?n:"/".concat(n),p=await this.loadFiles(e);if(!p[u])return{success:!1,error:"File ".concat(u," does not exist")};let h=new a.W(r,{...c,files:p}),m=h.validateFileMovement(u);if(!m.valid)return{success:!1,error:m.error};let g={...p};delete g[u];let f=l.y.computeBuildMetadata(g),x=(0,i.qs)(this.db),b=this.getFilesCollection(e);return x.delete((0,i.JU)(b,l.y.pathToDocId(u))),x.update(o,{metadata:f,updated:(0,i.Bt)()}),await x.commit(),{success:!0}}catch(e){return console.error("Error deleting file:",e),{success:!1,error:"Failed to delete file"}}}async renameFile(e,n,t,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"free";try{var s;let c=(0,i.JU)(this.db,"userBuilds",e),d=await (0,i.QT)(c);if(!d.exists())return{success:!1,error:"Build not found"};let u=d.data(),p=new BuildAccessControl(u);
1if(!p.canEdit(r))return{success:!1,error:"Unauthorized: Cannot edit this build"};let h=n.startsWith("/")?n:"/"+n,m=t.startsWith("/")?t:"/"+t;if(h===m)return{success:!0};let g=await this.loadFiles(e);if(!g[h])return{success:!1,error:"File ".concat(h," does not exist")};if(g[m])return{success:!1,error:"File ".concat(m," already exists")};let f=new a.W(o,{...u,files:g}),x=f.validateFileMovement(h);if(!x.valid)return{success:!1,error:x.error};let b=f.validatePathDepth(m);if(!b.valid)return{success:!1,error:b.error};let v=m.split("/").pop()||"",w=f.validateFileExtension(v);if(!w.valid)return{success:!1,error:w.error};let y=g[h],H={...g};delete H[h],H[m]={...y,path:m};let V=l.y.computeBuildMetadata(H),j=(0,i.qs)(this.db),k=this.getFilesCollection(e);return j.delete((0,i.JU)(k,l.y.pathToDocId(h))),j.set((0,i.JU)(k,l.y.pathToDocId(m)),{code:y.code,path:m,readOnly:null!==(s=y.readOnly)&&void 0!==s&&s}),j.update(c,{metadata:V,updated:(0,i.Bt)()}),await j.commit(),{success:!0}}catch(e){return console.error("Error renaming file:",e),{success:!1,error:"Failed to rename file"}}}async addFile(e,n,t){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"free",o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];try{let s=(0,i.JU)(this.db,"userBuilds",e),c=await (0,i.QT)(s);if(!c.exists())return{success:!1,error:"Build not found"};let d=c.data(),u=new BuildAccessControl(d);if(!u.canEdit(t))return{success:!1,error:"Unauthorized: Cannot edit this build"};let p=n.startsWith("/")?n:"/".concat(n),h=await this.loadFiles(e),m=new a.W(r,{...d,files:h}),g=m.validateAddFile(p);if(!g.valid)return{success:!1,error:g.error};let f={...h,[p]:{code:"",path:p,readOnly:o}},x=l.y.computeBuildMetadata(f),b=(0,i.qs)(this.db),v=this.getFilesCollection(e);return b.set((0,i.JU)(v,l.y.pathToDocId(p)),{code:"",path:p,readOnly:o}),b.update(s,{metadata:x,updated:(0,i.Bt)()}),await b.commit(),{success:!0}}catch(e){return console.error("Error adding file:",e),{success:!1,error:"Failed to add file"}}}async updateBuildTitle(e,n,t){try{var r;if(n.length>200)return console.error("Title too long"),!1;let o=(0,i.JU)(this.db,"userBuilds",e),a=await (0,i.QT)(o);if(!a.exists())return!1;if((null===(r=a.data())||void 0===r?void 0:r.uid)!==t)return console.error("Unauthorized: Cannot rename this build"),!1;let s=l.y.generateSlugTitle(n),c=(0,i.IO)((0,i.hJ)(this.db,"userBuilds"),(0,i.ar)("uid","==",t),(0,i.ar)("slugTitle","==",s)),d=await (0,i.PL)(c);if(!d.empty&&d.docs[0].id!==e)return!1;return await (0,i.r7)(o,{title:n,slugTitle:s,updated:(0,i.Bt)()}),!0}catch(e){return console.error("Error updating build title:",e),!1}}async deleteBuild(e,n){try{let t=(0,i.JU)(this.db,"userBuilds",e),r=await (0,i.QT)(t);if(!r.exists())throw Error("Build not found");let o=r.data();if(o.uid!==n)throw Error("Unauthorized: Cannot delete this build");let a=await (0,i.PL)(this.getFilesCollection(e)),l=(0,i.qs)(this.db);return a.docs.forEach(e=>{l.delete(e.ref)}),l.delete(t),await l.commit(),!0}catch(e){return console.error("Error deleting build:",e),!1}}async updatePrivacy(e,n,t){try{let r=(0,i.JU)(this.db,"userBuilds",e),o=await (0,i.QT)(r);if(!o.exists())throw Error("Build not found");let a=o.data();if(a.uid!==t)throw Error("Unauthorized: Only owner can change privacy");return await (0,i.r7)(r,{public:n,updated:(0,i.Bt)()}),!0}catch(e){return console.error("Error updating privacy:",e),!1}}async inviteUser(e,n,t,r){try{let o=(0,i.JU)(this.db,"userBuilds",e),a=await (0,i.QT)(o);if(!a.exists())throw Error("Build not found");let l=a.data();if(l.uid!==r)throw Error("Unauthorized: Only owner can invite users");let s=l.invited.find(e=>e.uid===n);if(s){let e=l.invited.map(e=>e.uid===n?{...e,access:t}:e);await (0,i.r7)(o,{invited:e})}else{let e={uid:n,access:t,invitedAt:i.EK.now()};await (0,i.r7)(o,{invited:[...l.invited,e]})}return!0}catch(e){return console.error("Error inviting user:",e),!1}}async removeInvitedUser(e,n,t){try{let r=(0,i.JU)(this.db,"userBuilds",e),o=await (0,i.QT)(r);if(!o.exists())throw Error("Build not found");let a=o.data();if(a.uid!==t)throw Error("Unauthorized: Only owner can remove invited users");let l=a.invited.filter(e=>e.uid!==n);return await (0,i.r7)(r,{invited:l}),!0}catch(e){return console.error("Error removing invited user:",e),!1}}async setCustomDomain(e,n,t){try{let r=(0,i.JU)(this.db,"userBuilds",e),o=await (0,i.QT)(r);if(!o.exists())throw Error("Build not found");let a=o.data();if(a.uid!==t)throw Error("Unauthorized: Only owner can set custom domain");if(!l.y.isValidDomain(n))throw Error("Invalid domain format");let s=(0,i.IO)((0,i.hJ)(this.db,"userBuilds"),(0,i.ar)("customDomain.domain","==",n)),c=await (0,i.PL)(s);if(!c.empty&&c.docs[0].id!==e)throw Error("Domain already in use");return await (0,i.r7)(r,{customDomain:{domain:n,verified:!1,sslEnabled:!1},updated:(0,i.Bt)()}),!0}catch(e){return console.error("Error setting custom domain:",e),!1}}async verifyCustomDomain(e,n){try{let t=(0,i.JU)(this.db,"userBuilds",e),r=await (0,i.QT)(t);if(!r.exists())throw Error("Build not found");let o=r.data();if(o.uid!==n)throw Error("Unauthorized");return await (0,i.r7)(t,{"customDomain.verified":!0,"customDomain.verifiedAt":(0,i.Bt)(),"customDomain.sslEnabled":!0,updated:(0,i.Bt)()}),!0}catch(e){return console.error("Error verifying custom domain:",e),!1}}}},62660:function(e,n,t){t.d(n,{kz:function(){return useStoreUserBuild}});var i=t(92369),r=t(39828),o=t(67294),a=t(9473),l=t(609),s=t(37585);function useStoreUserBuild(e){let{buildId:n,username:t}
1=e,i=(0,a.v9)(l.f8),r=(0,o.useCallback)(async function(e){let{code:t}=e;i&&await storeChallengeCodeForAUser({code:t,uid:i,buildId:n})},[n,i]),c=(0,o.useCallback)(async function(){return t?await fetchChallengeCodeForAUser({uid:i,buildId:n,username:t}):null},[n,i,t]),d=(0,o.useCallback)(async function(e){if(!i)return!1;try{let t=await updateBuildTitleForAUser({title:e,uid:i,buildId:n});return t}catch(e){return console.error(e),!1}},[n,i]),u=(0,o.useCallback)(async function(e){if(!i)return!1;try{let t=s.y.generateSlugTitle(e);return await doesSlugTitleExist({uid:i,slugTitle:t,excludeBuildId:n})}catch(e){return console.error(e),!1}},[n,i]),p=(0,o.useCallback)(async function(){return t?await fetchBuildType({buildId:n,username:t}):null},[n,t]),h=(0,o.useCallback)(async e=>!!i&&await updateBuildFields({uid:i,buildId:n,fields:e}),[n,i]);return{saveCodeToFirebase:r,fetchCodeFromFirebase:c,updateBuildTitle:d,fetchBuildType:p,checkSlugTitleExists:u,updateBuildFields:h}}async function fetchChallengeCodeForAUser(e){let{buildId:n,uid:t,username:i}=e;try{var r;let e=await fetch("/api/builds/getBuildInfoWithId",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({buildId:n,username:i})}),o=await e.json();if(!e.ok||o.message)return null;return{code:o.code,uid:o.uid,title:o.title,type:o.type,id:n,owner:t===o.uid,buildAssets:null!==(r=null==o?void 0:o.buildAssets)&&void 0!==r?r:{}}}catch(e){return console.error(e),null}}async function storeChallengeCodeForAUser(e){let{buildId:n,code:t,uid:o}=e,{firestore:a}=(0,i.UM)();try{let e=(0,r.JU)((0,r.hJ)(a,"userBuilds"),n),i=await (0,r.QT)(e),l=i.data();if(!l||"html-css-js"===l.type)return;l.uid===o&&await (0,r.pl)(e,{code:t,updated:(0,r.Bt)()},{merge:!0})}catch(e){console.error(e)}}async function updateBuildTitleForAUser(e){let{title:n,uid:t,buildId:o}=e,{firestore:a}=(0,i.UM)();try{var l;let e="string"==typeof n?n:null==n?void 0:n.title;if("string"!=typeof e)return!1;if(e.length>200)return console.error("Title too long"),!1;let i=(0,r.JU)((0,r.hJ)(a,"userBuilds"),o),c=await (0,r.QT)(i);if(!c.exists())return!1;if((null===(l=c.data())||void 0===l?void 0:l.uid)!==t)return console.error("Unauthorized: Cannot rename this build"),!1;let d=s.y.generateSlugTitle(e),u=(0,r.hJ)(a,"userBuilds"),p=await (0,r.PL)((0,r.IO)(u,(0,r.ar)("uid","==",t),(0,r.ar)("slugTitle","==",d)));if(!p.empty){let e=p.docs.some(e=>e.id!==o);if(e)return!1}return await (0,r.r7)(i,{title:e,slugTitle:d}),!0}catch(e){return console.error(e),!1}}async function doesSlugTitleExist(e){let{uid:n,slugTitle:t,excludeBuildId:o}=e,{firestore:a}=(0,i.UM)();try{let e=(0,r.hJ)(a,"userBuilds"),i=await (0,r.PL)((0,r.IO)(e,(0,r.ar)("uid","==",n),(0,r.ar)("slugTitle","==",t)));if(i.empty)return!1;return i.docs.some(e=>e.id!==o)}catch(e){return console.error(e),!1}}async function fetchBuildType(e){let{buildId:n,username:t}=e;if(!t||!n)return null;try{let e=n.replace(/\s+/g,"-"),i=await fetch("/api/builds/getBuildInfo",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t,slugTitle:e})}),r=await i.json();if("User not found"===r.message)return{error:!0,message:"User not found"};if("Build not found"===r.message)return{error:!0,message:"Build not found"};return{type:r.type,buildObj:r,buildDocId:r.id}}catch(e){return console.error(e),{error:!0,message:e instanceof Error?e.message:String(e)}}}async function updateBuildFields(e){let{uid:n,buildId:t,fields:o}=e;try{var a;let e={};for(let[n,t]of Object.entries(o))void 0!==t&&(e[n]=t);if(0===Object.keys(e).length)return!1;let{firestore:l}=(0,i.UM)(),s=(0,r.JU)((0,r.hJ)(l,"userBuilds"),t),c=await (0,r.QT)(s);if(!c.exists())return!1;if((null===(a=c.data())||void 0===a?void 0:a.uid)!==n)return console.error("Unauthorized: Cannot update this build"),!1;return await (0,r.r7)(s,{...e,updated:(0,r.Bt)()}),!0}catch(e){return console.error(e),!1}}},78327:function(e,n,t){t.d(n,{u:function(){return useHtmlCssJsBuild}});var i=t(67294),r=t(9473),o=t(609),a=t(66492);function useHtmlCssJsBuild(e){let{buildId:n,username:t}=e,l=(0,r.v9)(o.f8);(0,r.v9)(o.xF);let s=(0,i.useMemo)(()=>new a.h,[]),c=(0,i.useCallback)(async function(e,t,i){if(!l)return{success:!1,error:"Not authenticated"};try{let r=await fetch("/api/builds/save",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({buildId:n,files:e,expectedVersion:t,currentFiles:i})}),o=await r.json().catch(()=>({}));if(!r.ok)return{success:!1,error:o.error,currentVersion:"number"==typeof o.currentVersion?o.currentVersion:void 0};return{success:!0,currentVersion:"number"==typeof o.currentVersion?o.currentVersion:void 0}}catch(e){return console.error("Error saving build:",e),{success:!1,error:"Network error"}}},[n,l]),d=(0,i.useCallback)(async function(){if(!t)return null;let e=n.replace(/\s+/g,"-");try{let n=await fetch("/api/builds/getBuildBySlug",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:t,slugTitle:e})});if(404===n.status||403===n.status)return null;if(!n.ok)throw Error("getBuildBySlug failed: ".concat(n.status));return await n.json()}catch(e){return console.error("Error fetching build:",e),null}},[t,n,l]),u=(0,i.useCallback)(async function(e){return!!l&&await s.updateBuildTitle(n,e,l)},[n,s,l]),p=(0,i.useCallback)(async function(e){let{path:t,expectedVersion:i,readOnly:r,currentFiles:o}=e;if(!l)return{success:!1,error:"Not authenticated"};try{let e=await fetch("/api/builds/addFile",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({buildId:n,path:t,expectedVersion:i,readOnly:r,currentFiles:o})}),a=await e.json().catch(()=>({}));if(!e.ok)return{success:!1,error:a.error,currentVersion:"number"==typeof a.currentVersion?a.currentVersion:void 0};return{success:!0,currentVersion:"number"==typeof a.currentVersion?a.currentVersion:void 0}}catch(e){return console.error("Error adding file:",e),{success:!1,error:"Network error"}}},[n,l]),h=(0,i.useCallback)(async function(e){let{path:t,expectedVersion:i,currentFiles:r}=e;if(!l)return{success:!1,error:"Not authenticated"};try{let e=await fetch("/api/builds/deleteFile",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({buildId:n,path:t,expectedVersion:i,currentFiles:r})}),o=await e.json().catch(()=>({}));if(!e.ok)return{success:!1,error:o.error,currentVersion:"number"==typeof o.currentVersion?o.currentVersion:void 0};return{success:!0,currentVersion:"number"==typeof o.currentVersion?o.currentVersion:void 0}}catch(e){return console.error("Error deleting file:",e),{success:!1,error:"Network error"}}},[n,l]),m=(0,i.useCallback)(async function(e,t,i,r){if(!l)return{success:!1,error:"Must be logged in"};try{let o=await fetch("/api/builds/renameFile",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({buildId:n,oldPath:e,newPath:t,expectedVersion:i,currentFiles:r})}),a=await o.json().catch(()=>({}));if(!o.ok)return{success:!1,error:a.error,currentVersion:"number"==typeof a.currentVersion?a.currentVersion:void 0};return{success:!0,currentVersion:"number"==typeof a.currentVersion?a.currentVersion:void 0}}catch(e){return console.error("Error renaming file:",e),{success:!1,error:"Network error"}}},[n,l]),g=(0,i.useCallback)(async function(e){return!!l&&await s.updatePrivacy(n,e,l)},[n,s,l]),f=(0,i.useCallback)(async function(e,t){return!!l&&await s.inviteUser(n,e,t,l)},[n,s,l]),x=(0,i.useCallback)(async function(e){return!!l&&await s.removeInvitedUser(n,e,l)},[n,s,l]),b=(0,i.useCallback)(async function(e){if(!l)return{available:!1,reason:"auth"};try{let t=await fetch("/api/builds/checkSubdomainAvailability",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({slug:e,buildId:n})}),i=await t.json().catch(()=>({}));if(401===t.status)return{available:!1,reason:"auth"};if(403===t.status)return{available:!1,reason:"tier"};if(!t.ok)return{available:!1,reason:"network",message:null==i?void 0:i.error};return i}catch(e){return console.error("Error checking subdomain availability:",e),{available:!1,reason:"network"}}},[n,l]),v=(0,i.useCallback)(async function(e){if(!l)return{success:!1,error:"auth"};try{let t=await fetch("/api/builds/setSubdomainSlug",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({buildId:n,slug:e})}),i=await t.json().catch(()=>({}));if(t.ok)return{success:!0};let r=null==i?void 0:i.code;switch(r){case"auth":return{success:!1,error:"auth",message:null==i?void 0:i.error};case"tier":return{success:!1,error:"tier"};case"forbidden":return{success:!1,error:"forbidden",message:null==i?void 0:i.error};
1case"format":case"invalid_body":return{success:!1,error:"format",message:null==i?void 0:i.error};case"reserved":return{success:!1,error:"reserved"};case"taken":return{success:!1,error:"taken"};case"not_found":return{success:!1,error:"not_found",message:null==i?void 0:i.error}}if(401===t.status)return{success:!1,error:"auth"};if(403===t.status)return{success:!1,error:"forbidden"};if(404===t.status)return{success:!1,error:"not_found"};if(409===t.status)return{success:!1,error:"taken"};return{success:!1,error:"network",message:null==i?void 0:i.error}}catch(e){return console.error("Error setting subdomain slug:",e),{success:!1,error:"network"}}},[n,l]);return{saveBuild:c,fetchBuild:d,updateTitle:u,updatePrivacy:g,inviteUser:f,removeInvitedUser:x,checkSubdomainAvailability:b,setSubdomainSlug:v,addFile:p,deleteFile:h,renameFile:m}}},43754:function(e,n,t){t.d(n,{a:function(){return useRemixBuild}});var i=t(67294),r=t(11163),o=t(9473),a=t(609),l=t(73845),s=t(85673);function useRemixBuild(){let e=(0,r.useRouter)(),n=(0,o.v9)(a.zr),t=(0,l.T)(),[c,d]=(0,i.useState)(!1);return{remix:async function(i){let{buildId:r,title:o}=i;if(c||!r)return!1;d(!0);try{let i="string"==typeof o?o:(null==o?void 0:o.title)||"Untitled Project",a=await fetch("/api/builds/remix",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sourceBuildId:r,newTitle:"".concat(i," copy")}),credentials:"include"}),l=await a.json().catch(()=>({}));if(!a.ok||!(null==l?void 0:l.success)||!(null==l?void 0:l.slugTitle))return t((0,s.fz)({message:(null==l?void 0:l.error)||"Couldn't remix this build",type:"error"})),!1;return await e.push("/@".concat(n,"/build/").concat(l.slugTitle)),!0}catch(e){return console.error("Remix error:",e),t((0,s.fz)({message:"Couldn't remix this build",type:"error"})),!1}finally{d(!1)}},remixing:c}}},82479:function(e,n,t){t.d(n,{G$:function(){return o},Mm:function(){return getUserLimits},W2:function(){return r}});var i=t(59717);let r={ALLOWED_EXTENSIONS:[".html",".css",".js",".json",".svg",".md",".txt"],MAX_PATH_DEPTH:2,IMMOVABLE_FILES:["/index.html"],MAX_FILE_NAME_LENGTH:100,MAX_DIRECTORY_NAME_LENGTH:50};function getUserLimits(e){let n=i.LX[e];return{maxTotalFiles:n.maxFiles,maxDirectories:n.maxDirectories,maxFilesPerDirectory:Math.min(20,n.maxFiles),maxFileSize:n.maxFileSize,maxTotalSize:n.maxTotalSize,allowedExtensions:n.allowedExtensions,canUseCustomDomain:n.canUseCustomDomain,maxInvites:n.maxInvites}}let o={"/index.html":{code:'<!DOCTYPE html>\n<html lang="en">\n<head>\n  <meta charset="UTF-8">\n  <meta name="viewport" content="width=device-width, initial-scale=1.0">\n  <title>My Project</title>\n  <link rel="stylesheet" href="style.css">\n</head>\n<body>\n  <script src="script.js"></script>\n</body>\n</html>',readOnly:!1,path:"/index.html"},"/style.css":{code:"/* Global Styles */\n* {\n  margin: 0;\n  padding: 0;\n  box-sizing: border-box;\n}\n\nbody {\n  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;\n  line-height: 1.6;\n  padding: 20px;\n  background-color: #f5f5f5;\n  color: #333;\n}\n\nh1 {\n  color: #2563eb;\n  margin-bottom: 10px;\n}\n\np {\n  color: #666;\n}",readOnly:!1,path:"/style.css"},"/script.js":{code:"// Write code below \uD83D\uDC96\n\ndocument.addEventListener('DOMContentLoaded', () => {\n  // DOM is ready\n});",readOnly:!1,path:"/script.js"}}},98170:function(e,n,t){t.d(n,{Z:function(){return HtmlCssJsFileSystem}});var i=t(39828),r=t(59717),o=t(52646),a=t(82479);let HtmlCssJsFileSystem=class HtmlCssJsFileSystem{static createNewBuild(e,n){arguments.length>2&&void 0!==arguments[2]&&arguments[2];let t=arguments.length>3?arguments[3]:void 0,r=i.EK.now(),o=null!=t?t:a.G$;return{id:"",uid:e,name:n,slugTitle:"",type:"html-css-js",files:{...o},created:r,updated:r,metadata:{totalFiles:3,totalDirectories:0,directories:{}},public:!1,invited:[],remixCount:0}}getDefaultCode(e,n){switch(e){case".html":return'<!DOCTYPE html>\n<html lang="en">\n<head>\n  <meta charset="UTF-8">\n  <title>'.concat(n,"</title>\n</head>\n<body>\n  \n</body>\n</html>");case".css":return"/* ".concat(n," */\n");case".js":return"// ".concat(n,"\n");default:return""}}getBuild(){return this.build}async addFile(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.startsWith("/")?e:"/".concat(e),o=this.validator.validateAddFile(r);
1if(!o.valid)return{success:!1,error:o.error,errorCode:o.errorCode};let a=r.split("/").pop()||"",l=a.substring(a.lastIndexOf(".")),s=n||this.getDefaultCode(l,a),c={code:s,readOnly:t,path:r};this.build.files[r]=c,this.build.metadata.totalFiles++;let d=r.split("/").filter(e=>e.length>0);if(2===d.length){let e=d[0];!this.build.metadata.directories[e]&&(this.build.metadata.directories[e]={name:e,fileCount:0,files:[]},this.build.metadata.totalDirectories++),this.build.metadata.directories[e].fileCount++,this.build.metadata.directories[e].files.push(r)}return this.build.updated=i.EK.now(),{success:!0,data:c}}async updateFile(e,n){let t=e.startsWith("/")?e:"/".concat(e);return this.build.files[t]?(this.build.files[t].code=n,this.build.updated=i.EK.now(),{success:!0}):{success:!1,error:"File ".concat(t," does not exist"),errorCode:r.Ls.INVALID_PATH}}async deleteFile(e){let n=e.startsWith("/")?e:"/".concat(e);if(!this.build.files[n])return{success:!1,error:"File ".concat(n," does not exist"),errorCode:r.Ls.INVALID_PATH};let t=this.validator.validateFileMovement(n);if(!t.valid)return{success:!1,error:t.error,errorCode:t.errorCode};delete this.build.files[n],this.build.metadata.totalFiles--;let o=n.split("/").filter(e=>e.length>0);if(2===o.length){let e=o[0],t=this.build.metadata.directories[e];t&&(t.fileCount--,t.files=t.files.filter(e=>e!==n),0===t.fileCount&&(delete this.build.metadata.directories[e],this.build.metadata.totalDirectories--))}return this.build.updated=i.EK.now(),{success:!0}}async createDirectory(e){let n=this.validator.validateAddDirectory(e);return n.valid?(this.build.metadata.directories[e]={name:e,fileCount:0,files:[]},this.build.metadata.totalDirectories++,this.build.updated=i.EK.now(),{success:!0}):{success:!1,error:n.error,errorCode:n.errorCode}}async deleteDirectory(e){let n=this.build.metadata.directories[e];if(!n)return{success:!1,error:"Directory ".concat(e," does not exist"),errorCode:r.Ls.INVALID_PATH};let t=[...n.files];for(let e of t){let n=this.validator.validateFileMovement(e);if(!n.valid)return{success:!1,error:"Cannot delete directory: ".concat(n.error),errorCode:n.errorCode};delete this.build.files[e],this.build.metadata.totalFiles--}return delete this.build.metadata.directories[e],this.build.metadata.totalDirectories--,this.build.updated=i.EK.now(),{success:!0}}async renameFile(e,n){let t=e.startsWith("/")?e:"/".concat(e),o=n.startsWith("/")?n:"/".concat(n);if(!this.build.files[t])return{success:!1,error:"File ".concat(t," does not exist"),errorCode:r.Ls.INVALID_PATH};let a=this.validator.validateFileMovement(t);if(!a.valid)return{success:!1,error:a.error,errorCode:a.errorCode};if(this.build.files[o])return{success:!1,error:"File ".concat(o," already exists"),errorCode:r.Ls.FILE_ALREADY_EXISTS};let l=this.validator.validatePathDepth(o);if(!l.valid)return{success:!1,error:l.error,errorCode:l.errorCode};let s=o.split("/").pop()||"",c=this.validator.validateFileExtension(s);if(!c.valid)return{success:!1,error:c.error,errorCode:c.errorCode};let d={...this.build.files[t]};d.path=o,this.build.files[o]=d,await this.deleteFile(t);let u=o.split("/").filter(e=>e.length>0);if(2===u.length){let e=u[0];!this.build.metadata.directories[e]&&(this.build.metadata.directories[e]={name:e,fileCount:0,files:[]},this.build.metadata.totalDirectories++),this.build.metadata.directories[e].fileCount++,this.build.metadata.directories[e].files.push(o),this.build.metadata.totalFiles++}return this.build.updated=i.EK.now(),{success:!0}}getDirectoryFiles(e){let n=this.build.metadata.directories[e];return n?n.files.map(e=>this.build.files[e]).filter(Boolean):[]}getRootFiles(){return Object.values(this.build.files).filter(e=>{let n=e.path.split("/").filter(e=>e.length>0);return 1===n.length})}constructor(e,n){this.build=e,this.userTier=n,this.validator=new o.W(n,e)}}},59717:function(e,n,t){var i,r;t.d(n,{LX:function(){return o},Ls:function(){return i}}),(r=i||(i={})).INVALID_PATH="INVALID_PATH",r.FILE_ALREADY_EXISTS="FILE_ALREADY_EXISTS",r.DIRECTORY_ALREADY_EXISTS="DIRECTORY_ALREADY_EXISTS",r.INVALID_EXTENSION="INVALID_EXTENSION",r.FILE_LIMIT_EXCEEDED="FILE_LIMIT_EXCEEDED",r.DIRECTORY_LIMIT_EXCEEDED="DIRECTORY_LIMIT_EXCEEDED",r.PATH_TOO_DEEP="PATH_TOO_DEEP",r.IMMOVABLE_FILE="IMMOVABLE_FILE",r.INVALID_
1NAME="INVALID_NAME";let o={free:{maxFiles:10,maxDirectories:3,maxFileSize:102400,maxTotalSize:512e3,allowedExtensions:[".html",".css",".js"],canUseCustomDomain:!1,maxInvites:0},club:{maxFiles:50,maxDirectories:10,maxFileSize:512e3,maxTotalSize:5242880,allowedExtensions:[".html",".css",".js",".json",".svg",".md",".txt"],canUseCustomDomain:!0,maxInvites:5},clubplusplus:{maxFiles:200,maxDirectories:50,maxFileSize:1048576,maxTotalSize:20971520,allowedExtensions:[".html",".css",".js",".json",".svg",".md",".txt",".ts",".tsx"],canUseCustomDomain:!0,maxInvites:20}}},37585:function(e,n,t){t.d(n,{y:function(){return FileSystemUtils}});var i=t(82479);let FileSystemUtils=class FileSystemUtils{static parsePath(e){let n=e.startsWith("/")?e:"/".concat(e),t=n.split("/").filter(e=>e.length>0),i=t[t.length-1],r=i.substring(i.lastIndexOf(".")),o=2===t.length?t[0]:null,a=1===t.length;return{directory:o,fileName:i,extension:r,isRootLevel:a}}static buildPath(e,n){return e?"/".concat(e,"/").concat(n):"/".concat(n)}static isValidPath(e){let n=e.startsWith("/")?e:"/".concat(e);if(!n.startsWith("/")||n.endsWith("/"))return!1;let t=n.split("/").filter(e=>e.length>0);if(0===t.length||t.length>2)return!1;let i=t[t.length-1];return!!(i&&i.includes("."))}static isValidDirectoryName(e){return!(e.includes("/")||e.includes(" "))&&0!==e.trim().length&&!(e.length>50)}static getFilesByType(e,n){return Object.values(e.files).filter(e=>e.path.endsWith(n))}static getFileCountByType(e){let n={html:0,css:0,js:0};return Object.values(e.files).forEach(e=>{e.path.endsWith(".html")&&n.html++,e.path.endsWith(".css")&&n.css++,e.path.endsWith(".js")&&n.js++}),n}static sortFilesForDisplay(e){let n=Object.values(e.files).filter(e=>{let n=e.path.split("/").filter(e=>e.length>0);return 1===n.length}).sort((e,n)=>"/index.html"===e.path?-1:"/index.html"===n.path?1:e.path.localeCompare(n.path)),t=Object.keys(e.metadata.directories).sort().map(n=>({name:n,files:e.metadata.directories[n].files.map(n=>e.files[n]).filter(Boolean).sort((e,n)=>e.path.localeCompare(n.path))}));return{rootFiles:n,directories:t}}static getUsageStats(e,n){let t=(0,i.Mm)(n);return{files:{current:e.metadata.totalFiles,max:t.maxTotalFiles,percentage:Math.round(e.metadata.totalFiles/t.maxTotalFiles*100)},directories:{current:e.metadata.totalDirectories,max:t.maxDirectories,percentage:Math.round(e.metadata.totalDirectories/t.maxDirectories*100)},filesByType:this.getFileCountByType(e),directoryStats:Object.values(e.metadata.directories).map(e=>({name:e.name,fileCount:e.fileCount,maxFiles:t.maxFilesPerDirectory}))}}static canAddFile(e,n,t){let r=(0,i.Mm)(n);if(e.metadata.totalFiles>=r.maxTotalFiles)return{canAdd:!1,reason:"Maximum ".concat(r.maxTotalFiles," files reached for ").concat(n," tier")};if(t){let n=e.metadata.directories[t];if(n&&n.fileCount>=r.maxFilesPerDirectory)return{canAdd:!1,reason:"Maximum ".concat(r.maxFilesPerDirectory," files per directory reached")}}return{canAdd:!0}}static canAddDirectory(e,n){let t=(0,i.Mm)(n);return e.metadata.totalDirectories>=t.maxDirectories?{canAdd:!1,reason:"Maximum ".concat(t.maxDirectories," directories reached for ").concat(n," tier")}:{canAdd:!0}}static exportBuildAsZip(e){let n={};return Object.values(e.files).forEach(e=>{let t=e.path.startsWith("/")?e.path.substring(1):e.path;n[t]=e.code}),n}static generatePreviewHTML(e){let n=e.files["/index.html"];return n?n.code:"<html><body><h1>Error: index.html not found</h1></body></html>"}static pathToDocId(e){return e.replace(/^\//,"").replace(/\//g,"__")}static docIdToPath(e){return"/"+e.replace(/__/g,"/")}static generateSlugTitle(e){return e.toLowerCase().replace(/\s+/g,"-").replace(/\//g,"-").replace(/[^a-z0-9-]/g,"").substring(0,100)}static hasUsableSlug(e){return/[a-z0-9]/.test(FileSystemUtils.generateSlugTitle(e))}static isValidDomain(e){return/^[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,}$/i.test(e)}static computeBuildMetadata(e){let n={},t=0;for(let i of Object.keys(e)){t++;let e=i.split("/").filter(Boolean);if(2===e.length){let t=e[0];n[t]||(n[t]={name:t,fileCount:0,files:[]}),n[t].fileCount++,n[t].files.push(i)}}return{totalFiles:t,totalDirectories:Object.keys(n).length,directories:n}}}},52646:function(e,n,t){t.d(n,{W:function(){return HtmlCssJsFileSystemValidator}});var i=t(59717),r=t(82479);let HtmlCssJsFileSystemValidator=class HtmlCssJsFileSystemValidator{validateFileExtension(e){let n=e.substring(e.lastIndexOf("."));return this.limits.allowedExtensions.includes(n)?{valid:!0}:{valid:!1,error:"File extension ".concat(n," is not allowed for ").concat(this.userTier," tier. Allowed: ").concat(this.limits.allowedExtensions.join(", ")),errorCode:i.Ls.INVALID_EXTENSION}}validatePathDepth(e){let n=e.split("/").filter(e=>e.length>0);return n.length>2?{valid:!1,error:"Files can only be one directory deep",errorCode:i.Ls.PATH_TOO_DEEP}:{valid:!0}}validateTotalFileCount(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=this.build.metadata.totalFiles+e;return n>
1this.limits.maxFiles?{valid:!1,error:"File limit exceeded. ".concat(this.userTier," tier allows ").concat(this.limits.maxFiles," files. You have ").concat(this.build.metadata.totalFiles,"."),errorCode:i.Ls.FILE_LIMIT_EXCEEDED}:{valid:!0}}validateDirectoryCount(){return this.build.metadata.totalDirectories>=this.limits.maxDirectories?{valid:!1,error:"Directory limit exceeded. ".concat(this.userTier," tier allows ").concat(this.limits.maxDirectories," directories."),errorCode:i.Ls.DIRECTORY_LIMIT_EXCEEDED}:{valid:!0}}validateFileMovement(e){return r.W2.IMMOVABLE_FILES.includes(e)?{valid:!1,error:"".concat(e," cannot be moved or deleted"),errorCode:i.Ls.IMMOVABLE_FILE}:{valid:!0}}validateFileName(e){return/[<>:"|?*\\]/.test(e)?{valid:!1,error:"File name contains invalid characters",errorCode:i.Ls.INVALID_NAME}:e.includes("__")?{valid:!1,error:"File name cannot contain consecutive underscores (__) — reserved for path encoding",errorCode:i.Ls.INVALID_NAME}:0===e.length||e.length>100?{valid:!1,error:"File name must be between 1 and 100 characters",errorCode:i.Ls.INVALID_NAME}:{valid:!0}}validateAddFile(e){if(this.build.files[e])return{valid:!1,error:"File ".concat(e," already exists"),errorCode:i.Ls.FILE_ALREADY_EXISTS};let n=this.validatePathDepth(e);if(!n.valid)return n;let t=this.validateTotalFileCount();if(!t.valid)return t;let r=e.split("/").filter(e=>e.length>0);for(let e of r){let n=this.validateFileName(e);if(!n.valid)return n}let o=r[r.length-1]||"",a=this.validateFileExtension(o);return a.valid?{valid:!0}:a}validateAddDirectory(e){if(this.build.metadata.directories[e])return{valid:!1,error:"Directory ".concat(e," already exists"),errorCode:i.Ls.DIRECTORY_ALREADY_EXISTS};let n=this.validateDirectoryCount();if(!n.valid)return n;let t=this.validateFileName(e);return t.valid?{valid:!0}:t}constructor(e,n){this.userTier=e,this.build=n,this.limits=i.LX[e]}}},89547:function(e,n,t){t.d(n,{AC:function(){return buildSubdomainUrl}});function buildSubdomainUrl(e){return"https://".concat(e,".").concat("codedex.me")}},57194:function(e,n,t){t.d(n,{Y:function(){return AssetLimit},rd:function(){return m},JE:function(){return g},QF:function(){return h},Yn:function(){return p},R7:function(){return getDefaultFileNameFromLanguage},mU:function(){return getFileEntry},Xo:function(){return getFileKind},WT:function(){return getFileNameFromExtension},jQ:function(){return getFileRenderMode},JM:function(){return languageForFile},d8:function(){return u}});var i=t(10739),r=t(73835),o=t(57951),a=t(60261),l=t(81150),s=t(58444),c=t(89528),d=t(85893),builds_ImageIcon=function(e){let{fill:n="#CBD5E1",...t}=e;return(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"18",viewBox:"0 0 20 18",fill:"none",children:(0,d.jsx)("path",{d:"M20 18H0V0H20V18ZM2 16H18V2H2V16ZM6 14H4V12H6V14ZM8 12H6V10H8V12ZM16 12H14V10H16V12ZM10 10H8V8H10V10ZM14 10H12V8H14V10ZM12 8H10V6H12V8ZM6 6H4V4H6V6Z",fill:"#94A3B8"})})};let u={github:i,"brilliance-black":r,"tomorrow-night-blue":l,"night-owl":a,clouds:o},p={js:{displayName:".js",internaleName:"js"},html:{displayName:".html",internaleName:"html"},css:{displayName:".css",internaleName:"css"}},h=5,m="k7Rm2Xq9vTb-Lp4Ns8Wd_Zj3Hy6Fc1Gu5Ae",g=10485760;function AssetLimit(e){let{isClub:n}=e;return n?1073741824:g}let f={py:{kind:"code",monacoLanguage:"python",defaultFileName:"script.py",image:"/images/editor/python-logo.png"},js:{kind:"code",monacoLanguage:"javascript",defaultFileName:"index.js",image:"/images/editor/javascript-logo.png"},ts:{kind:"code",monacoLanguage:"typescript",defaultFileName:"index.ts",image:"/images/editor/typescript-logo.png"},cpp:{kind:"code",monacoLanguage:"cpp",defaultFileName:"main.cpp",image:"/images/courses/cpp-logo.svg"},java:{kind:"code",monacoLanguage:"java",defaultFileName:"HelloWorld.java",image:"/images/java/java_logo.png"},sql:{kind:"code",monacoLanguage:"sql",defaultFileName:"query.sql",image:"/images/sql-course/Sql_data_base_with_logo.png"},lua:{kind:"code",monacoLanguage:"lua",defaultFileName:"main.lua",image:"/images/editor/lua.png"},cs:{kind:"code",monacoLanguage:"csharp",defaultFileName:"Program.cs",image:"/images/courses/csharp-logo.svg"},html:{kind:"code",monacoLanguage:"html",defaultFileName:"index.html",image:"/images/editor/html-logo.png"},css:{kind:"code",monacoLanguage:"css",defaultFileName:"styles.css",image:"/images/editor/css-logo.png"},png:{kind:"image",mimeType:"image/png",image:builds_ImageIcon},jpg:{kind:"image",mimeType:"image/jpeg",image:builds_ImageIcon},jpeg:{kind:"image",mimeType:"image/jpeg",image:builds_ImageIcon},webp:{kind:"image",mimeType:"image/webp",image:builds_ImageIcon},gif:{kind:"image",mimeType:"image/gif",image:builds_ImageIcon},svg:{kind:"image",mimeType:"image/svg+xml",image:builds_ImageIcon},mp4:{kind:"video",mimeType:"video/mp4",image:s.Z},webm:{kind:"video",mimeType:"video/webm",image:s.Z},ogg:{kind:"video",mimeType:"video/ogg",image:s.Z},mov:{kind:"video",mimeType:"video/quicktime",image:s.Z},mp3:{kind:"audio",mimeType:"audio/mpeg",image:c.Z},wav:{kind:"audio",mimeType:"audio/wav",image:c.Z},aac:{kind:"audio",mimeType:"audio/aac",image:c.Z},flac:{kind:"audio",mimeType:"audio/flac",image:c.Z}},isFileExtension=e=>e in f,getFileExtension=e=>{var n;let t=e.split(".");return 1===t.length||2===t.length&&""===t[0]?"":null!==(n=t.pop())&&void 0!==n?n:""},getFileEntry=e=>{let n=getFileExtension(e);return isFileExtension(n)?f[n]:null},getFileKind=e=>{var n;let t=getFileEntry(e);return null!==(n=null==t?void 0:t.kind)&&void 0!==n?n:"plaintext"}
1,getFileRenderMode=e=>{if(!e)return"monaco";let n=getFileKind(e);return"image"===n?"image":"video"===n?"video":"audio"===n?"audio":"monaco"},languageForFile=e=>{let n=getFileEntry(e);return(null==n?void 0:n.kind)==="code"?n.monacoLanguage:"plaintext"},getExtensionFromLanguage=e=>Object.keys(f).find(n=>"code"===f[n].kind&&f[n].monacoLanguage===e),getDefaultFileNameFromLanguage=e=>f[getExtensionFromLanguage(e)],getFileNameFromExtension=e=>{let n=getFileEntry(e);return n||f.py}}}]);

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.