PageSourceSearch

https://www.neuralblocks.ai/_next/static/chunks/414-966fe76b74ab2c27.js?dpl=dpl_EQKR1AqFFtMTBwL9429nWsD7ju4M

js neuralblocks.ai collected 2026-10-05 13:05:57 UTC 8,166 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[414],{20414:(e,t,r)=>{r.d(t,{Af:()=>C,Fk:()=>A,Go:()=>f,HD:()=>S,JR:()=>m,ME:()=>j,PG:()=>B,QE:()=>o,Rc:()=>E,S2:()=>i,V8:()=>x,VX:()=>M,Y6:()=>N,aQ:()=>l,eK:()=>s,gc:()=>d,hm:()=>T,iV:()=>y,p1:()=>c,rn:()=>w,rs:()=>h,yG:()=>P});var n=r(22441);function i(e){return e.trim().toLowerCase().replace(/\s+/g,"-").replace(/_/g,"-")}function o(e,t){let r=(e||"").trim(),n=(t||"").trim();return!!r&&!!n&&(r===n||r.toLowerCase()===n.toLowerCase()||i(r)===i(n))}function l(e){let t=(e||"").trim();if(!t||/\s/.test(t))return!1;let r=(t||"").trim();if(!r)return!1;let n=i(r);return n.includes("-")&&n.split("-").filter(Boolean).length>=2}let u="neuralblocks_selected_track_title";function a(e,t){let r=(e||"").trim(),n=t.trim();if(!(!r||!n||l(n)))try{localStorage.setItem(u,JSON.stringify({key:r,title:n}))}catch(e){}}function c(e,t){a(e,(t||"").trim())}function s(e,t){let r=((null==e?void 0:e.title)||(null==e?void 0:e.name)||"").trim();if(r&&!l(r))return a(t||(null==e?void 0:e.key),r),r;let n=(t||"").trim();return n&&!l(n)?(a(n,n),n):function(e){let t=(e||"").trim();if(!t)return"";try{let e=localStorage.getItem(u);if(!e)return"";let r=JSON.parse(e),n="string"==typeof(null==r?void 0:r.key)?r.key.trim():"",i="string"==typeof(null==r?void 0:r.title)?r.title.trim():"";if(!i||l(i))return"";if(n&&o(t,n)||t===i||o(t,i))return i;return""}catch(e){return""}}(t||(null==e?void 0:e.key))}function f(e,t,r){if(0===t.length)return!1;let n=t.map(e=>(e||"").trim()).filter(e=>e.length>0),i="string"==typeof(null==r?void 0:r.key)?r.key.trim():"";if(i&&n.some(e=>o(e,i)))return!0;let l=(e||"").trim();return!!(l&&n.some(e=>o(e,l)))}function m(e){let t=null==e?void 0:e.purchasedTrackIdentifiers;return Array.isArray(t)&&t.length>0?[...new Set(t.map(e=>String(e).trim()).filter(Boolean))]:[]}function d(e,t){let r="string"==typeof t.key?t.key.trim():"";return!!r&&f(r,e,{key:r})}function h(e){if("string"==typeof e.key&&e.key.trim())return i(e.key);let t=(e.title||e.name||"").trim();return t?i(t):"string"==typeof e.id&&e.id.trim()?e.id.trim():""}let p="neuralblocks_selected_track",b="/api/user/selected-track";function y(){try{let e=localStorage.getItem(p);return e?JSON.parse(e):null}catch(e){return console.error("Error reading selected track from storage:",e),null}}function g(e){try{localStorage.setItem(p,JSON.stringify(e))}catch(e){console.error("Error saving selected track to storage:",e)}}async function k(){try{let e=await fetch(b,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(e.ok)return(await e.json()).selectedTrack||null}catch(e){console.error("Error fetching selected track from backend:",e)}return null}async function v(e){try{return(await fetch(b,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({selectedTrack:e})})).ok}catch(e){return console.error("Error saving selected track to backend:",e),!1}}async function S(e){let t=function(e){let t="string"==typeof e.key?e.key.trim():"";if(t)return t;let r="string"==typeof e.title?e.title.trim():"";return r||("string"==typeof e.name?e.name.trim():"")}(e);return t?(await P(t),C(t),t):null}async function w(){let e=y();if(e)return e;let t=await k();return t?(g(t),t):null}async function P(e){g(e);try{await v(e)}catch(e){console.error("Failed to sync selected track to backend:",e)}}let M="neuralblocks:selected-track-change";function C(e){window.dispatchEvent(new CustomEvent(M,{detail:{trackName:e}}))}async function N(){localStorage.removeItem(p),localStorage.removeItem(u);try{await fetch(b,{method:"DELETE",credentials:"include"})}catch(e){console.error("Error clearing selected track from backend:",e)}}function A(e,t){return"pro"===t[e]}
1function T(e,t,r,i){if(A(e,t))return"/dashboard/learner";if((0,n.AB)(i))return"/plans";if(!0===i.isFree||0===i.price)return"/dashboard/learner";let o=(0,n.o5)(i),l=i.name||i.title||"Track";return"/payment?plan=".concat(e,"&type=").concat(r,"&price=").concat(o,"&name=").concat(encodeURIComponent(l))}function E(e,t){return A(e,t)?{text:"Purchased",className:"bg-gradient-to-r from-emerald-500 to-emerald-600 border border-emerald-400 text-white",show:!0}:{text:"",className:"",show:!1}}function j(e){if(!e)return"8 weeks";if("object"==typeof e&&null!=e.value){let t=e.unit||"months";return"".concat(e.value," ").concat(t)}return String(e)}function x(e){if(!e)return"";let t="string"==typeof e?new Date(e):e;return isNaN(t.getTime())?"":t.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function B(e){if(!e)return null;let t="string"==typeof e?new Date(e):e;if(isNaN(t.getTime()))return null;let r=new Date;r.setHours(0,0,0,0);let n=new Date(t);n.setHours(0,0,0,0);let i=Math.ceil((n.getTime()-r.getTime())/864e5);return i>=0?i:null}},22441:(e,t,r)=>{r.d(t,{AB:()=>a,B8:()=>n,Ie:()=>h,Io:()=>v,M0:()=>P,Po:()=>g,Tf:()=>s,hA:()=>y,h_:()=>i,ht:()=>d,i$:()=>f,jR:()=>u,mX:()=>c,o5:()=>p,pm:()=>S,qH:()=>w,xv:()=>b});let n=30,i=90,o=["Early access available.","Unlock at the lowest price."],l=["You have early access.","Unlocked at the Lowest Price."];function u(e){return!0===e.isPublished?"published":!0===e.isBeta?"beta":!1===e.isPublished||!0===e.comingSoon?"comingSoon":"published"}function a(e){return"comingSoon"===u(e)}function c(e){return"beta"===u(e)}function s(e){return"comingSoon"!==u(e)}function f(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let n=t.filter(e=>!!e),i=n.some(e=>!0===e.isBeta),o=n.some(e=>!0===e.isPublished);return{isPublished:o&&!i,isBeta:i,comingSoon:n.some(e=>!0===e.comingSoon)&&!i&&!o}}function m(e){return e?{isPublished:!0===e.isPublished,isBeta:!0===e.isBeta}:null}function d(e){var t;let r=(null==(t=e.visual)?void 0:t.key)?m(e.visual):null;return u(f(m(e.catalog),r))}function h(e){return"published"===e?{isPublished:!0,isBeta:!1}:"beta"===e?{isPublished:!1,isBeta:!0}:{isPublished:!1,isBeta:!1}}function p(e){var t;if(!0===e.isFree)return 0;let r="number"==typeof e.price&&Number.isFinite(e.price)?Math.max(0,e.price):0,n="number"!=typeof(t=e.betaPrice)||!Number.isFinite(t)||t<=0?null:t;return"beta"===u(e)?null!=n?n:r:null!=n?Math.max(r,n):r}function b(e){let t=u(e),r=p(e);return{offerUsd:r,compareAtUsd:function(e,t){let r=[e.price,e.originalPrice].filter(e=>"number"==typeof e&&Number.isFinite(e)&&e>t);return r.length?Math.max(...r):null}(e,r),stage:t}}function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return null==e||!Number.isFinite(e)||e<=0?null:Math.max(0,Math.floor(e)-Math.max(0,Math.floor(t)))}function g(e){let t=u(e);return"published"===t?0:"beta"===t?1:2}function k(e){return!!e&&"object"==typeof e}function v(e){if(!e)return null;let t=Math.max(0,Number(e.moduleCount)||0)+Math.max(0,Number(e.projectCount)||0);if(t>0)return Math.max(0,Math.min(100,Math.round((Math.max(0,Number(e.publishedModuleCount)||0)+Math.max(0,Number(e.publishedProjectCount)||0))/t*100)));let r={total:0,published:0};if(!function e(t,r){if(k(t)){if(Array.isArray(t.modules))for(let e of t.modules)k(e)&&"PROJECT"!==e.type&&(r.total+=1,!0===e.isPublished&&(r.published+=1));if(Array.isArray(t.topics))for(let n of t.topics)e(n,r);if(Array.isArray(t.subTopics))for(let n of t.subTopics)e(n,r);if(Array.isArray(t.subTracks))for(let n of t.subTracks)e(n,r)}}(e,r),Array.isArray(e.projects))for(let t of e.projects)k(t)&&(r.total+=1,!0===t.isPublished&&(r.published+=1));return r.total<=0?null:Math.max(0,Math.min(100,Math.round(r.published/r.total*100)))}function S(e){let t=(null==e?void 0:e.purchased)?l:o;return[t[0],t[1]]}function w(e){return S(e).join(" ")}function P(e){var t,r,n,i,o,l,u,a;let c=b(e),s=c.stage;return{isPublished:"published"===s,isBeta:"beta"===s,comingSoon:"comingSoon"===s,price:c.offerUsd,originalPrice:null!=(t=c.compareAtUsd)?t:void 0,betaPrice:null!=(r=e.betaPrice)?r:null,betaSeatLimit:null!=(n=e.betaSeatLimit)?n:null,betaSeatsSold:null!=(i=e.betaSeatsSold)?i:0,moduleCount:null!=(o=e.moduleCount)?o:null,publishedModuleCount:null!=(l=e.publishedModuleCount)?l:null,projectCount:null!=(u=e.projectCount)?u:null,publishedProjectCount:null!=(a=e.publishedProjectCount)?a:null}}}}]);

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.