PageSourceSearch

https://typebuddy.ai/_next/static/chunks/app/layout-0bafbeed8c4b98b7.js

js typebuddy.ai collected 2026-09-25 22:30:26 UTC 18,351 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{6792:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var i=s(55253);let r={API_URL:(0,i.env)("NEXT_PUBLIC_API_URL"),COUNTLY_URL:(0,i.env)("NEXT_PUBLIC_COUNTLY_URL"),COUNTLY_APP_KEY:(0,i.env)("NEXT_PUBLIC_COUNTLY_APP_KEY")}},13395:(e,t,s)=>{"use strict";s.d(t,{Toaster:()=>n});var i=s(45942),r=s(82544),a=s(62089);let n=e=>{let{...t}=e,{theme:s="system"}=(0,r.D)();return(0,i.jsx)(a.l$,{theme:s,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...t})}},30596:()=>{},33959:e=>{e.exports={style:{fontFamily:"'Geist', 'Geist Fallback'",fontStyle:"normal"},className:"__className_188709",variable:"__variable_188709"}},39539:(e,t,s)=>{"use strict";s.d(t,{AppContextProvider:()=>n,B:()=>a});var i=s(45942),r=s(94166);let a=(0,r.createContext)(null);function n(e){let{initialUser:t,children:s}=e,n=(0,r.useMemo)(()=>new URLSearchParams(window.location.search).get("copyKey"),[]),[o,u]=(0,r.useState)(t);return(0,r.useEffect)(()=>{},[t,n]),(0,i.jsx)(a.Provider,{value:{user:o,setUser:u},children:s})}},56557:e=>{e.exports={style:{fontFamily:"'Geist Mono', 'Geist Mono Fallback'",fontStyle:"normal"},className:"__className_9a8899",variable:"__variable_9a8899"}},62767:(e,t,s)=>{"use strict";s.d(t,{CountlyProvider:()=>c});var i=s(45942),r=s(94166),a=s(28009),n=s.n(a),o=s(6792);let u=!1,l=()=>((0,r.useEffect)(()=>{if(!u&&o.A.COUNTLY_URL&&o.A.COUNTLY_APP_KEY)try{n().init({app_key:o.A.COUNTLY_APP_KEY,url:o.A.COUNTLY_URL}),n().track_sessions(),n().track_pageview(),n().track_clicks(),n().track_links(),n().track_forms(),u=!0,console.log("Countly initialized successfully")}catch(e){console.error("Failed to initialize Countly:",e)}},[]),{trackEvent:e=>{if(!u)return void console.warn("Countly not initialized, skipping event:",e.key);try{n().add_event(e)}catch(e){console.error("Failed to track Countly event:",e)}},trackPageView:e=>{if(u)try{n().track_pageview(e)}catch(e){console.error("Failed to track page view:",e)}},setUserData:e=>{if(u)try{n().user_details(e)}catch(e){console.error("Failed to set user data:",e)}},endSession:()=>{if(u)try{console.log("Countly session will be handled automatically")}catch(e){console.error("Failed to handle session:",e)}},isInitialized:u}),h=(0,r.createContext)(void 0);function c(e){let{children:t,user:s}=e,a=l();return(0,r.useEffect)(()=>{a.isInitialized&&s&&a.setUserData({name:s.name||void 0,email:s.email||void 0,username:s.email||void 0,custom:{user_id:s.id,role:s.role||"user",email_verified:s.emailVerified.toString()}})},[a,s]),(0,r.useEffect)(()=>{if(a.isInitialized&&1){let e=()=>{a.trackPageView(window.location.pathname)};return a.trackPageView(window.location.pathname),window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e)}}},[a]),(0,r.useEffect)(()=>()=>{a.isInitialized&&a.endSession()},[a]),(0,i.jsx)(h.Provider,{value:a,children:t})}},72036:(e,t,s)=>{"use strict";s.d(t,{QueryProvider:()=>P});var i=s(45942),r=s(94166),a=s(85390),n=s(72831),o=s(2595),u=s(1420),l=class extends u.Q{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,s){let i=t.queryKey,r=t.queryHash??(0,a.F$)(i,t),o=this.get(r);return o||(o=new n.X({client:e,queryKey:i,queryHash:r,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){o.jG.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,a.MK)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,a.MK)(e,t)):t}notify(e){o.jG.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){o.jG.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){o.jG.batch(()=>
1{this.getAll().forEach(e=>{e.onOnline()})})}},h=s(94138),c=s(48418),d=class extends h.k{#t;#s;#i;constructor(e){super(),this.mutationId=e.mutationId,this.#s=e.mutationCache,this.#t=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#r({type:"continue"})};this.#i=(0,c.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#r({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});let s="pending"===this.state.status,i=!this.#i.canStart();try{if(s)t();else{this.#r({type:"pending",variables:e,isPaused:i}),await this.#s.config.onMutate?.(e,this);let t=await this.options.onMutate?.(e);t!==this.state.context&&this.#r({type:"pending",context:t,variables:e,isPaused:i})}let r=await this.#i.start();return await this.#s.config.onSuccess?.(r,e,this.state.context,this),await this.options.onSuccess?.(r,e,this.state.context),await this.#s.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,e,this.state.context),this.#r({type:"success",data:r}),r}catch(t){try{throw await this.#s.config.onError?.(t,e,this.state.context,this),await this.options.onError?.(t,e,this.state.context),await this.#s.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,t,e,this.state.context),t}finally{this.#r({type:"error",error:t})}}finally{this.#s.runNext(this)}}#r(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),o.jG.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#s.notify({mutation:this,type:"updated",action:e})})}},m=class extends u.Q{constructor(e={}){super(),this.config=e,this.#a=new Set,this.#n=new Map,this.#o=0}#a;#n;#o;build(e,t,s){let i=new d({mutationCache:this,mutationId:++this.#o,options:e.defaultMutationOptions(t),state:s});return this.add(i),i}add(e){this.#a.add(e);let t=f(e);
1if("string"==typeof t){let s=this.#n.get(t);s?s.push(e):this.#n.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#a.delete(e)){let t=f(e);if("string"==typeof t){let s=this.#n.get(t);if(s)if(s.length>1){let t=s.indexOf(e);-1!==t&&s.splice(t,1)}else s[0]===e&&this.#n.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=f(e);if("string"!=typeof t)return!0;{let s=this.#n.get(t),i=s?.find(e=>"pending"===e.state.status);return!i||i===e}}runNext(e){let t=f(e);if("string"!=typeof t)return Promise.resolve();{let s=this.#n.get(t)?.find(t=>t!==e&&t.state.isPaused);return s?.continue()??Promise.resolve()}}clear(){o.jG.batch(()=>{this.#a.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#a.clear(),this.#n.clear()})}getAll(){return Array.from(this.#a)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,a.nJ)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,a.nJ)(e,t))}notify(e){o.jG.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>
1e.state.isPaused);return o.jG.batch(()=>Promise.all(e.map(e=>e.continue().catch(a.lQ))))}};function f(e){return e.options.scope?.id}var y=s(59974),p=s(56477);function v(e){return{onFetch:(t,s)=>{let i=t.options,r=t.fetchOptions?.meta?.fetchMore?.direction,n=t.state.data?.pages||[],o=t.state.data?.pageParams||[],u={pages:[],pageParams:[]},l=0,h=async()=>{let s=!1,h=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?s=!0:t.signal.addEventListener("abort",()=>{s=!0}),t.signal)})},c=(0,a.ZM)(t.options,t.fetchOptions),d=async(e,i,r)=>{if(s)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);let n=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:i,direction:r?"backward":"forward",meta:t.options.meta};return h(e),e})(),o=await c(n),{maxPages:u}=t.options,l=r?a.ZZ:a.y9;return{pages:l(e.pages,o,u),pageParams:l(e.pageParams,i,u)}};if(r&&n.length){let e="backward"===r,t={pages:n,pageParams:o},s=(e?function(e,{pages:t,pageParams:s}){return t.length>0?e.getPreviousPageParam?.(t[0],t,s[0],s):void 0}:g)(i,t);u=await d(t,s,e)}else{let t=e??n.length;do{let e=0===l?o[0]??i.initialPageParam:g(i,u);if(l>0&&null==e)break;u=await d(u,e),l++}while(l<t)}return u};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=h}}}function g(e,{pages:t,pageParams:s}){let i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,s[i],s):void 0}var b=class{#u;#s;#l;#h;#c;#d;#m;#f;constructor(e={}){this.#u=e.queryCache||new l,this.#s=e.mutationCache||new m,this.#l=e.defaultOptions||{},this.#h=new Map,this.#c=new Map,this.#d=0}mount(){this.#d++,1===this.#d&&(this.#m=y.m.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#u.onFocus())}),this.#f=p.t.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#u.onOnline())}))}unmount(){this.#d--,0===this.#d&&(this.#m?.(),this.#m=void 0,this.#f?.(),this.#f=void 0)}isFetching(e){return this.#u.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#s.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#u.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),s=this.#u.build(this,t),i=s.state.data;return void 0===i?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime((0,a.d2)(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#u.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,s){let i=this.defaultQueryOptions({queryKey:e}),r=this.#u.get(i.queryHash),n=r?.state.data,o=(0,a.Zw)(t,n);if(void 0!==o)return this.#u.build(this,i).setData(o,{...s,manual:!0})}setQueriesData(e,t,s){return o.jG.batch(()=>this.#u.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,s)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#u.get(t.queryHash)?.state}removeQueries(e){let t=this.#u;o.jG.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let s=this.#u;return o.jG.batch(()=>(s.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let s={revert:!0,...t};return Promise.all(o.jG.batch(()=>this.#u.findAll(e).map(e=>e.cancel(s)))).then(a.lQ).catch(a.lQ)}invalidateQueries(e,t={}){return o.jG.batch(()=>(this.#u.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let s={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(o.jG.batch(()=>this.#u.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,s);return s.throwOnError||(t=t.catch(a.lQ)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(a.lQ)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let s=this.#u.build(this,t);return s.isStaleByTime((0,a.d2)(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(a.lQ).catch(a.lQ)}fetchInfiniteQuery(e){return e.behavior=v(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(a.lQ).catch(a.lQ)}ensureInfiniteQueryData(e){return e.behavior=v(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return p.t.isOnline()?this.#s.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#u}getMutationCache(){return this.#s}getDefaultOptions(){return this.#l}setDefaultOptions(e){this.#l=e}setQueryDefaults(e,t){this.#h.set((0,a.EN)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#h.values()],s={};return t.forEach(t=>{(0,a.Cp)(e,t.queryKey)&&Object.assign(s,t.defaultOptions)}),s}setMutationDefaults(e,t){this.#c.set((0,a.EN)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#c.values()],s={};return t.forEach(t=>{(0,a.Cp)(e,t.mutationKey)&&Object.assign(s,t.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#l.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,a.F$)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===a.hT&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#l.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#u.clear(),this.#s.clear()}},C=s(44),w=function(){return null};function P(e){let{children:t}=e,[s]=(0,r.useState)(()=>new b({defaultOptions:{queries:{staleTime:3e5,gcTime:6e5,retry:(e,t)=>{if(t&&"object"==typeof t&&"status"in t){let e=t.status;if(e>=400&&e<500)return!1}return e<3}}}}));return(0,i.jsxs)(C.Ht,{client:s,children:[t,(0,i.jsx)(w,{initialIsOpen:!1})]})}}
1,77761:(e,t,s)=>{Promise.resolve().then(s.bind(s,39539)),Promise.resolve().then(s.bind(s,62767)),Promise.resolve().then(s.bind(s,72036)),Promise.resolve().then(s.bind(s,98188)),Promise.resolve().then(s.bind(s,44958)),Promise.resolve().then(s.bind(s,82544)),Promise.resolve().then(s.t.bind(s,76502,23)),Promise.resolve().then(s.t.bind(s,33959,23)),Promise.resolve().then(s.t.bind(s,56557,23)),Promise.resolve().then(s.bind(s,13395)),Promise.resolve().then(s.t.bind(s,30596,23))},82544:(e,t,s)=>{"use strict";s.d(t,{D:()=>h,ThemeProvider:()=>c});var i=s(94166),r=(e,t,s,i,r,a,n,o)=>{let u=document.documentElement,l=["light","dark"];function h(t){var s;(Array.isArray(e)?e:[e]).forEach(e=>{let s="class"===e,i=s&&a?r.map(e=>a[e]||e):r;s?(u.classList.remove(...i),u.classList.add(a&&a[t]?a[t]:t)):u.setAttribute(e,t)}),s=t,o&&l.includes(s)&&(u.style.colorScheme=s)}if(i)h(i);else try{let e=localStorage.getItem(t)||s,i=n&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;h(i)}catch(e){}},a=["light","dark"],n="(prefers-color-scheme: dark)",o="undefined"==typeof window,u=i.createContext(void 0),l={setTheme:e=>{},themes:[]},h=()=>{var e;return null!=(e=i.useContext(u))?e:l},c=e=>i.useContext(u)?i.createElement(i.Fragment,null,e.children):i.createElement(m,{...e}),d=["light","dark"],m=e=>{let{forcedTheme:t,disableTransitionOnChange:s=!1,enableSystem:r=!0,enableColorScheme:o=!0,storageKey:l="theme",themes:h=d,defaultTheme:c=r?"system":"light",attribute:m="data-theme",value:g,children:b,nonce:C,scriptProps:w}=e,[P,O]=i.useState(()=>y(l,c)),[_,q]=i.useState(()=>"system"===P?v():P),E=g?Object.values(g):h,Q=i.useCallback(e=>{let t=e;if(!t)return;"system"===e&&r&&(t=v());let i=g?g[t]:t,n=s?p(C):null,u=document.documentElement,l=e=>{"class"===e?(u.classList.remove(...E),i&&u.classList.add(i)):e.startsWith("data-")&&(i?u.setAttribute(e,i):u.removeAttribute(e))};if(Array.isArray(m)?m.forEach(l):l(m),o){let e=a.includes(c)?c:null,s=a.includes(t)?t:e;u.style.colorScheme=s}null==n||n()},[C]),k=i.useCallback(e=>{let t="function"==typeof e?e(P):e;O(t);try{localStorage.setItem(l,t)}catch(e){}},[P]),A=i.useCallback(e=>{q(v(e)),"system"===P&&r&&!t&&Q("system")},[P,t]);i.useEffect(()=>{let e=window.matchMedia(n);return e.addListener(A),A(e),()=>e.removeListener(A)},[A]),i.useEffect(()=>{let e=e=>{e.key===l&&(e.newValue?O(e.newValue):k(c))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[k]),i.useEffect(()=>{Q(null!=t?t:P)},[t,P]);let S=i.useMemo(()=>({theme:P,setTheme:k,forcedTheme:t,resolvedTheme:"system"===P?_:P,themes:r?[...h,"system"]:h,systemTheme:r?_:void 0}),[P,k,t,_,r,h]);return i.createElement(u.Provider,{value:S},i.createElement(f,{forcedTheme:t,storageKey:l,attribute:m,enableSystem:r,enableColorScheme:o,defaultTheme:c,value:g,themes:h,nonce:C,scriptProps:w}),b)},f=i.memo(e=>{let{forcedTheme:t,storageKey:s,attribute:a,enableSystem:n,enableColorScheme:o,defaultTheme:u,value:l,themes:h,nonce:c,scriptProps:d}=e,m=JSON.stringify([a,s,u,t,h,l,n,o]).slice(1,-1);return i.createElement("script",{...d,suppressHydrationWarning:!0,nonce:"undefined"==typeof window?c:"",dangerouslySetInnerHTML:{__html:"(".concat(r.toString(),")(").concat(m,")")}})}),y=(e,t)=>{let s;if(!o){try{s=localStorage.getItem(e)||void 0}catch(e){}return s||t}},p=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},v=e=>(e||(e=window.matchMedia(n)),e.matches?"dark":"light")}},e=>{var t=t=>e(e.s=t);e.O(0,[1137,147,6199,8626,5253,2089,2254,3449,2681,7358],()=>t(77761)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.