1"use strict";(self.rspackChunknewapi_web=self.rspackChunknewapi_web||[]).push([[3085],{51854(e,t,n){var a=n(72361),o=n(68413),r=n(56275);function i(e){let{className:t,tone:n="brand"}=e,i=(0,o.useId)(),l=(0,r.cn)("inline-block size-[1em] shrink-0 align-[-0.12em]",t);return"dark"===n?(0,a.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":!0,className:l,children:[(0,a.jsx)("path",{d:"M7 4h10l4 5.5L12 21 3 9.5 7 4z",fill:"#14101f"}),(0,a.jsx)("path",{d:"M3 9.5h18M7 4l5 5.5L17 4M12 21 9 9.5M12 21l3-11.5",stroke:"#b8aef0",strokeWidth:"1.2",fill:"none",opacity:".8"})]}):(0,a.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":!0,className:l,children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:i,x1:"0",y1:"0",x2:"1",y2:"1",children:[(0,a.jsx)("stop",{offset:"0",stopColor:"#b39de8"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#9a9cf0"})]})}),(0,a.jsx)("path",{d:"M7 4h10l4 5.5L12 21 3 9.5 7 4z",fill:`url(#${i})`,opacity:".92"}),(0,a.jsx)("path",{d:"M3 9.5h18M7 4l5 5.5L17 4M12 21 9 9.5M12 21l3-11.5",stroke:"#14101f",strokeWidth:"1",fill:"none",opacity:".55"})]})}n.d(t,{X:()=>i})},74501(e,t,n){var a=n(72361),o=n(82094),r=n(68324),i=n(60160),l=n(3732),s=n(58540),d=n(21136),c=n(11944);n(68413);var u=n(56275);function f(e){let{...t}=e;return(0,a.jsx)(o.y,{"data-slot":"popover",...t})}function h(e){let{...t}=e;return(0,a.jsx)(r.W,{"data-slot":"popover-trigger",...t})}function p(e){let{className:t,align:n="center",alignOffset:o=0,side:r="bottom",sideOffset:d=4,collisionPadding:c,collisionBoundary:f,collisionAvoidance:h,...p}=e;return(0,a.jsx)(i.i,{children:(0,a.jsx)(l.U,{align:n,alignOffset:o,side:r,sideOffset:d,collisionPadding:c,collisionBoundary:f,collisionAvoidance:h,className:"isolate z-50",children:(0,a.jsx)(s.i,{"data-slot":"popover-content",className:(0,u.cn)("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg p-2.5 text-sm shadow-md ring-1 outline-hidden duration-100 motion-reduce:animate-none",t),...p})})})}function m(e){let{className:t,...n}=e;return(0,a.jsx)("div",{"data-slot":"popover-header",className:(0,u.cn)("flex flex-col gap-0.5 text-sm",t),...n})}function g(e){let{className:t,...n}=e;return(0,a.jsx)(d.e,{"data-slot":"popover-title",className:(0,u.cn)("font-medium",t),...n})}function x(e){let{className:t,...n}=e;return(0,a.jsx)(c.u,{"data-slot":"popover-description",className:(0,u.cn)("text-muted-foreground",t),...n})}n.d(t,{AM:()=>f,DI:()=>m,Wv:()=>h,eO:()=>g,hl:()=>p,ui:()=>x})},15161(e,t,n){var a=n(72361),o=n(29261),r=n(32859),i=n(27075),l=n(49815),s=n(11803),d=n(56275);function c(e){let{className:t,children:n,...l}=e;return(0,a.jsxs)(o.V,{"data-slot":"scroll-area",className:(0,d.cn)("relative",t),...l,children:[(0,a.jsx)(r.B,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:n}),(0,a.jsx)(u,{}),(0,a.jsx)(i.I,{})]})}function u(e){let{className:t,orientation:n="vertical",...o}=e;return(0,a.jsx)(l.V,{"data-slot":"scroll-area-scrollbar","data-orientation":n,orientation:n,className:(0,d.cn)("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",t),...o,children:(0,a.jsx)(s.l,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}n.d(t,{F:()=>c})},75035(e,t,n){n.d(t,{E:()=>u});var a=n(71295),o=n(68413),r=n(13289),i=n(22990),l=n(79540),s=n(71795);let d=(0,l.v)()((0,s.Zr)((e,t)=>({lastReadNotice:"",readAnnouncementKeys:[],closedUntilDate:null,markNoticeRead:t=>{e({lastReadNotice:t.trim()})},markAnnouncementsRead:t=>{e(e=>({readAnnouncementKeys:[...new Set([...e.readAnnouncementKeys,...t])]}))},setClosedUntilDate:t=>{e({closedUntilDate:t})},isAnnouncementRead:e=>t().readAnnouncementKeys.includes(e),isNoticeClosed:()=>{let{closedUntilDate:e}=t();return!!e&&e===new Date().toDateString()}}),{name:"notification-storage",partialize:e=>({lastReadNotice:e.lastReadNotice,readAnnouncementKeys:e.readAnnouncementKeys,closedUntilDate:e.closedUntilDate})}));function c(e){if(!e)return"";if(void 0!==e.id&&null!==e.id)return`id:${e.id}`;let t=JSON.stringify({publishDate:e?.publishDate||"",content:(e?.content||"").trim(),extra:(e?.extra||"").trim(),type:e?.type||"",title:(e?.title||"").trim(),link:(e?.link||"").trim()});return`hash:${function(e){let t=0;if(!e)return"0";for(let n=0;n<e.length;n+=1)t=(t<<5)-t+e.charCodeAt(n)|0;return t.toString(36)}(t)}`}function u(){let[e,t]=(0,o.useState)(!1),[n,l]=(0,o.useState)("notice"),{data:s,isLoading:u,refetch:f}=(0,a.I)({queryKey:["notice"],queryFn:i.jU,staleTime:3e5}),{status:h,loading:p}=(0,r.s)(),m=h?.announcements_enabled?(h?.announcements||[]).slice(0,20):[],{lastReadNotice:g,markNoticeRead:x,markAnnouncementsRead:v,isAnnouncementRead:b}=d(),y=s?.success?(s.data||"").trim():"",j=(0,o.useMemo)(()=>{let e=y&&y!==g?1:0,t=m.filter(e=>!b(c(e))).length;return{notice:e,announcements:t,total:e+t}},[y,g,m,b]),w=()=>{m.length>0&&v(m.map(e=>c(e)))},N=e=>{let a=e||n;y&&x(y),"announcements"===a&&w(),l(a),t(!0)};return{notice:y,announcements:m,loading:u||p,unreadCount:j.total,unreadNoticeCount:j.notice,unreadAnnouncementsCount:j.announcements,popoverOpen:e,setPopoverOpen:e=>{e?N(n):t(!1)},activeTab:n,setActiveTab:e=>{l(e),"announcements"===e&&w()},openPopover:N,closePopover:()=>t(!1),refetchNotice:f}}},13289(e,t,n){var a=n(71295),o=n(68413),r=n(22990),i=n(43919),l=n(57129);let s=null;function d(){let{data:e,isLoading:t,error:n,isPlaceholderData:d}=(0,a.I)({queryKey:["status"],queryFn:async()=>await (0,r.BS)(),placeholderData:function(){try{if("u">typeof window){let e=window.localStorage.getItem("status");return e?JSON.parse(e):void 0}}catch{}}(),staleTime:3e5,gcTime:18e5});return(0,o.useEffect)(()=>
1{if(e&&!d&&e!==s){s=e;try{let{setConfig:t}=i.Eh.getState();t((0,l.a)(e))}catch(e){}try{window.localStorage.setItem("status",JSON.stringify(e))}catch{}}},[e,d]),{status:e??null,loading:t,error:n}}n.d(t,{s:()=>d})},89689(e,t,n){n.d(t,{v:()=>u});var a=n(68413),o=n(24327),r=n(13289);let i="/docs";function l(e){return/^https?:\/\//i.test(e)}var s=n(6695),d=n(89795),c=n(52523);function u(){let{t:e}=(0,o.Bd)(),{status:t}=(0,r.s)(),{auth:n}=(0,c.n)(),u=(0,a.useMemo)(()=>(0,s.L1)(t),[t]),f=t?.docs_link,h=!!n?.user,p=(n?.user?.role??0)>=d.z7.ADMIN,m=[];u?.home!==!1&&m.push({title:e("Home"),href:"/"}),u?.console!==!1&&p&&m.push({title:e("Console"),href:"/dashboard"}),m.push({title:e("Studio"),href:"/studio",requiresAuth:!h});let g=u?.pricing;if(g&&"object"==typeof g&&g.enabled){let t=g.requireAuth&&!h;m.push({title:e("Inspiration Square"),href:"/pricing",requiresAuth:t})}let x=u?.rankings;if(x&&"object"==typeof x&&x.enabled){let t=x.requireAuth&&!h;m.push({title:e("Rankings"),href:"/rankings",requiresAuth:t})}if(u?.docs!==!1){let t,n={href:t=function(e){let t=e?.trim();if(!t)return i;if(!l(t))return t;try{if("docs.newapi.pro"===new URL(t).hostname)return i}catch{}return t}(f),external:l(t)};m.push({title:e("Docs"),href:n.href,external:n.external})}return u?.platform!==!1&&m.push({title:e("API Platform"),href:"/platform",requiresAuth:!h}),u?.about!==!1&&m.push({title:e("About"),href:"/about"}),m}}}]);
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.