PageSourceSearch

https://ribbi.ai/_next/static/chunks/2009-9c761d18ea674160.js

js ribbi.ai collected 2026-10-05 12:32:45 UTC 32,258 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2009],{12968:(e,t,r)=>{"use strict";r.d(t,{U:()=>c,u:()=>s});var a=r(95155),n=r(1974),o=r(12115),i=r(62833);let l=(0,o.createContext)(null);function s({children:e}){let t=(0,n.T_)(),[c,d]=(0,o.useState)(t),[u,f]=(0,o.useState)(null),[h,m]=(0,o.useState)(null),[p,w]=(0,o.useState)(!1),g=(0,o.useRef)(0),x=(0,i.sr)(),b=(0,o.useCallback)(async e=>{let a=++g.current;if(d(t),f(e.meta?.loadPrompts?{...e,meta:{...e.meta,promptsLoading:!0,promptsError:!1}}:e),x(i.XB,{media_type:e.type}),!h&&!p){w(!0);try{let e=await Promise.all([r.e(5537),r.e(5287),r.e(1907),r.e(8306),r.e(3213),r.e(7195),r.e(3510),r.e(4133),r.e(6751),r.e(7927),r.e(9629)]).then(r.bind(r,60737));m(()=>e.MediaPreviewModal)}catch(e){console.error("Failed to load MediaPreviewModal:",e)}finally{w(!1)}}if(e.meta?.loadPrompts)try{let t=await e.meta.loadPrompts();a===g.current&&f(e=>e?{...e,meta:{...e.meta,prompts:t&&t.length>0?t:e.meta?.prompts,promptsLoading:!1}}:null)}catch(e){console.error("Failed to load prompts:",e),a===g.current&&f(e=>e?{...e,meta:{...e.meta,promptsLoading:!1,promptsError:!0}}:null)}},[h,p,x,t]),k=(0,o.useCallback)(()=>{g.current++,f(null),x(i.LA)},[x]),v=null!==u&&c===t;return(0,a.jsxs)(l.Provider,{value:{open:b,close:k,isOpen:v},children:[e,h&&u&&c===t&&(0,a.jsx)(h,{data:u,onClose:k})]})}function c(){let e=(0,o.useContext)(l);if(!e)throw Error("useMediaPreview must be used within MediaPreviewProvider");return e}},12971:(e,t,r)=>{"use strict";r.d(t,{cH:()=>n,e3:()=>o,yO:()=>a});let a=[{key:"generation",labelKey:"asset.tabs.generation"},{key:"favorite",labelKey:"asset.tabs.favorite"},{key:"collection",labelKey:"asset.tabs.collection"},{key:"skill",labelKey:"asset.tabs.skill"}];function n(e){return e&&"generation"!==e?"favorite"===e||"skill"===e?e:"collection":"generation"}function o(e){let t=e.match(/^\/pond\/asset\/(.+)/);return t?t[1]:"/pond/asset"===e?"collection":e.match(/^\/pond\/(.+)/)?.[1]??null}},17661:e=>{e.exports={frame:"WatermarkEffectPreview_frame__XP5D4",scene:"WatermarkEffectPreview_scene__4v2ce",fallback:"WatermarkEffectPreview_fallback__cNgIq",placeholder:"WatermarkEffectPreview_placeholder__cmwD_",photo:"WatermarkEffectPreview_photo__YWcwV",markBox:"WatermarkEffectPreview_markBox__1uU8R",mark:"WatermarkEffectPreview_mark__1UdF8",glow:"WatermarkEffectPreview_glow__5U17u",imageScale:"WatermarkEffectPreview_imageScale__2c_l4",mark0:"WatermarkEffectPreview_mark0___4A5H",markLeft:"WatermarkEffectPreview_markLeft___v_z4",mark1:"WatermarkEffectPreview_mark1__7si3j",markTop:"WatermarkEffectPreview_markTop__oojWQ",mark2:"WatermarkEffectPreview_mark2__SYRdz",markRight:"WatermarkEffectPreview_markRight__JfBQO",mark3:"WatermarkEffectPreview_mark3__dhV9E",markBottom:"WatermarkEffectPreview_markBottom__Q4hya",glowSize:"WatermarkEffectPreview_glowSize__u64cr",glowOpacity:"WatermarkEffectPreview_glowOpacity__r6ILN",glowColor:"WatermarkEffectPreview_glowColor__Gi7bN",glowBlur:"WatermarkEffectPreview_glowBlur__9Augl"}},28971:(e,t,r)=>{"use strict";function a(e,t){let r={"image/webp":"webp","image/png":"png","image/jpeg":"jpg","video/mp4":"mp4"}[t.type.split(";")[0]];return r?`${e.replace(/\.[a-z0-9]{1,5}$/i,"")}.${r}`:e}async function n(e,t){if(!e.isCurrent())throw new DOMException("Scope changed","AbortError");let r=new URL(e.url,window.location.origin).origin===window.location.origin,a=await fetch(e.url,{signal:t,credentials:r?"same-origin":"omit"});if(!a.ok)throw Error("Download unavailable");let n=await a.blob();if(!e.isCurrent())throw new DOMException("Scope changed","AbortError");return n}r.d(t,{X:()=>n,y:()=>a})},28993:(e,t,r)=>{"use strict";r.d(t,{M:()=>n});var a=r(83881);async function n(){return a.uE.get("/auth/check-admin")}},45913:(e,t,r)=>{"use strict";r.d(t,{Tn:()=>u,q4:()=>f,JU:()=>h});var a=r(95155),n=r(12115),o=r(69400),i=r(7603),l=r(41463);let s={maxReconnectionDelay:1e4,minReconnectionDelay:1e3,reconnectionDelayGrowFactor:1.3,maxRetries:1/0,connectionTimeout:1e4},c=(0,n.createContext)(null);function d(){return"u">typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"u">typeof crypto&&"function"==typeof crypto.getRandomValues?"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=(15&crypto.getRandomValues(new Uint8Array(1))[0])>>3*("x"!==e);return("x"===e?t:3&t|8).toString(16)}):"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function u({children:e,userId:t}){let r=(0,n.useRef)(null),f=(0,n.useRef)(""),h=(0,n.useRef)(new Map),m=(0,n.useRef)(!1),p=(0,n.useRef)(null),w=(0,n.useRef)(""),[g,x]=(0,n.use
1State)(!1),b=(0,n.useCallback)(()=>{if(!t)return i.v.warn("Cannot build WebSocket URL: userId is null"),"";let e=l.env.NEXT_PUBLIC_WS_BACKEND_URL;if(e)try{let r=new URL("/api/v1/agents/push",e);return r.protocol.startsWith("ws")||(r.protocol="https:"===r.protocol?"wss:":"ws:"),r.searchParams.set("userId",t),r.toString()}catch(t){i.v.error("Failed to build backend WebSocket URL",{wsBackendUrl:e,error:t instanceof Error?t.message:String(t)})}let r="https:"===window.location.protocol?"wss:":"ws:",a=window.location.host;return`${r}//${a}/api/v1/agents/push?userId=${encodeURIComponent(t)}`},[t]),k=(0,n.useCallback)(e=>{try{let t=JSON.parse(e.data);if("notification"===t.type){let e=t.notification,r=h.current.get(e.category);i.v.debug("[PushCenter] notification received",{category:e.category,action:e.action}),r?.forEach(t=>{try{t(e)}catch(e){i.v.error("Notification handler error",e instanceof Error?e:Error(String(e)))}});let a=h.current.get("*");a?.forEach(t=>{try{t(e)}catch(e){i.v.error("Global notification handler error",e instanceof Error?e:Error(String(e)))}})}}catch(e){i.v.error("Failed to parse PushCenter message",e instanceof Error?e:Error(String(e)))}},[]),v=(0,n.useCallback)(()=>{let e;if(!t)return void i.v.debug("PushCenter: skipping connect, userId is null");if(r.current?.readyState===WebSocket.OPEN||r.current?.readyState===WebSocket.CONNECTING)return void i.v.debug("PushCenter already connected or connecting",{readyState:r.current.readyState,connectionId:w.current});r.current&&(i.v.debug("Closing existing WebSocket before reconnecting",{connectionId:w.current}),r.current.close(),r.current=null),f.current||((e=sessionStorage.getItem("evo.push-center.tab-id"))||(e=d(),sessionStorage.setItem("evo.push-center.tab-id",e),i.v.debug("Generated new Tab ID",{tabId:e})),f.current=e),w.current=d().slice(0,8),m.current=!1;let a=b();if(!a)return void i.v.error("Failed to build WebSocket URL");i.v.info("PushCenter connecting",{connectionId:w.current,tabId:f.current,userId:t,url:a});let n=new o.kb(b,[],{...s,debug:!1});n.addEventListener("open",()=>{i.v.info("PushCenter connected successfully",{connectionId:w.current,tabId:f.current,readyState:n.readyState,url:n.url}),x(!0),n.send(JSON.stringify({type:"register",tabId:f.current})),p.current&&(n.send(JSON.stringify({type:"context-update",context:p.current})),i.v.debug("PushCenter resent last context after reconnect",{connectionId:w.current,context:p.current}))}),n.addEventListener("message",k),n.addEventListener("close",e=>{i.v.info("PushCenter closed",{connectionId:w.current,code:e.code,reason:e.reason,wasClean:e.wasClean,isManualDisconnect:m.current}),x(!1)}),n.addEventListener("error",e=>{i.v.error("PushCenter WebSocket error",{connectionId:w.current,type:e.type,readyState:n?.readyState})}),r.current=n},[t,b,k]),y=(0,n.useCallback)(()=>{m.current=!0,r.current&&(i.v.info("PushCenter disconnecting",{connectionId:w.current}),r.current.close(1e3,"User disconnected"),r.current=null),x(!1)},[]),_=(0,n.useCallback)(e=>{(p.current=e,r.current&&r.current.readyState===WebSocket.OPEN)?r.current.send(JSON.stringify({type:"context-update",context:e})):i.v.debug("Cannot update context: WebSocket not ready",{context:e})},[]),C=(0,n.useCallback)((e,t)=>(h.current.has(e)||h.current.set(e,new Set),h.current.get(e).add(t),i.v.debug("PushCenter: subscribed to category",{category:e}),()=>{h.current.get(e)?.delete(t),i.v.debug("PushCenter: unsubscribed from category",{category:e})}),[]);return(0,n.useEffect)(()=>(t&&v(),()=>{y()}),[t,v,y]),(0,a.jsx)(c.Provider,{value:{isConnected:g,updateContext:_,subscribe:C},children:e})}function f(){let e=(0,n.useContext)(c);if(!e)throw Error("usePushCenterContext must be used within PushCenterProvider");return e}function h(){return(0,n.useContext)(c)}},50201:(e,t,r)=>{"use strict";r.d(t,{A8:()=>_,yj:()=>v.y,X$:()=>v.X,aU:()=>C});var a=r(95155),n=r(12115),o=r(47650),i=r(89045),l=r(17661),s=r.n(l);let c=[{id:"28222:134133",x:42.58,y:152.5,boxWidth:105.353,boxHeight:58.081,width:100.148,cropLeft:-49.68,cropWidth:149.75},{id:"28222:134139",x:244.61,y:-8.5,boxWidth:105.476,boxHeight:58.114,width:100.276,cropLeft:-49.49,cropWidth:149.56},{id:"28222:134145",x:236,y:211,boxWidth:107.222,boxHeight:58.582,width:102.083,cropLeft:-46.84,cropWidth:146.91},{id:"28222:134151",x:52.29,y:345.5,boxWidth:105.221,boxHeight:58.045,width:100.012,cropLeft:-49.88,cropWidth:149.96}];function d({src:e,alt:t,fallback:r}
1){let[o,i]=(0,n.useState)(!1),[l,u]=(0,n.useState)(0),[f,h]=(0,n.useState)(!1),[m,p]=(0,n.useState)(!1),w=o&&l===(1<<c.length)-1&&!f;(0,n.useEffect)(()=>{let e;if(!w)return;let t=requestAnimationFrame(()=>{e=requestAnimationFrame(()=>p(!0))});return()=>{cancelAnimationFrame(t),void 0!==e&&cancelAnimationFrame(e)}},[w]);let g=async(e,t)=>{try{await e.decode(),e.isConnected&&t()}catch{e.isConnected&&h(!0)}};return(0,a.jsxs)("div",{className:s().frame,"data-ready":w,"data-animated":w&&m||void 0,"aria-busy":!w&&!f,children:[!w&&!f&&(0,a.jsx)("div",{className:s().placeholder,"aria-hidden":"true"}),f&&(0,a.jsx)("div",{className:s().fallback,children:r}),!f&&(0,a.jsxs)("div",{className:s().scene,"aria-hidden":!w,children:[(0,a.jsx)("img",{className:s().photo,src:e,alt:t,decoding:"async",loading:"eager",fetchPriority:"high",onLoad:e=>void g(e.currentTarget,()=>i(!0)),onError:()=>h(!0)}),c.map((e,t)=>(0,a.jsx)("span",{className:`${s().markBox} ${s()[`mark${t}`]}`,"aria-hidden":"true",style:{left:`${e.x/389*100}%`,top:`${(e.y-8)/389*100}%`,width:`${e.boxWidth/389*100}%`,height:`${e.boxHeight/389*100}%`},children:(0,a.jsx)("span",{className:s().mark,style:{width:`${e.width/389*100}cqw`},children:(0,a.jsx)("img",{src:"/images/watermark/ribbi-logo.png",alt:"",style:{left:`${e.cropLeft}%`,width:`${e.cropWidth}%`},onLoad:e=>void g(e.currentTarget,()=>u(e=>e|1<<t)),onError:()=>h(!0)})})},e.id)),(0,a.jsx)("span",{className:s().glow,"aria-hidden":"true"})]})]})}var u=r(98943),f=r.n(u);function h({src:e,alt:t}){let{t:r}
1=(0,i.s)(),[o,l]=(0,n.useState)(!1);return(0,a.jsx)("div",{className:f().preview,children:e&&!o?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("img",{className:f().image,src:e,alt:t,onError:()=>l(!0)})}):(0,a.jsx)("span",{className:f().previewFallback,children:r("billing.watermarkDownload.previewUnavailable")})})}function m({previewUrl:e,effectPreviewUrl:t,onClose:r,onDownloadWatermarked:l,onUpgrade:s,onLearnMore:c}){let{t:u}=(0,i.s)(),p=u("billing.watermarkDownload.previewAlt"),w=(0,n.useId)(),g=(0,n.useId)(),x=(0,n.useRef)(null),b=(0,n.useRef)(null);return((0,n.useEffect)(()=>{let e=x.current;if(!e)return;let t=document.activeElement,r=document.body.style.overflow;return e.showModal(),document.body.style.overflow="hidden",b.current?.focus({preventScroll:!0}),()=>{e.close(),document.body.style.overflow=r,t instanceof HTMLElement&&t.isConnected&&t.focus({preventScroll:!0})}},[]),"u"<typeof document)?null:(0,o.createPortal)((0,a.jsx)("dialog",{ref:x,className:f().dialog,"aria-labelledby":w,"aria-describedby":g,onCancel:e=>{e.preventDefault(),e.stopPropagation(),r()},onKeyDown:e=>{if("Escape"===e.key&&e.stopPropagation(),"Tab"!==e.key)return;let t=e.currentTarget.querySelectorAll("button:not(:disabled)"),r=t[0],a=t[t.length-1];r&&a&&(e.shiftKey&&(document.activeElement===r||document.activeElement===b.current)?(e.preventDefault(),a.focus()):e.shiftKey||document.activeElement!==a||(e.preventDefault(),r.focus()))},onClick:e=>{e.stopPropagation(),e.target===e.currentTarget&&r()},children:(0,a.jsxs)("div",{className:f().card,children:[(0,a.jsx)("div",{className:f().preview,children:t?(0,a.jsx)(d,{src:t,alt:p,fallback:(0,a.jsx)(h,{src:e,alt:p})},JSON.stringify([e,t])):(0,a.jsx)(h,{src:e,alt:p},e??"empty")}),(0,a.jsxs)("div",{className:f().details,children:[(0,a.jsxs)("header",{className:f().header,children:[(0,a.jsx)("h2",{ref:b,id:w,tabIndex:-1,className:f().title,children:u("billing.watermarkDownload.title")}),(0,a.jsx)("p",{id:g,className:f().description,children:u("billing.watermarkDownload.description")})]}),(0,a.jsxs)("div",{className:f().benefit,children:[(0,a.jsx)("p",{className:f().benefitTitle,children:u("billing.watermarkDownload.benefit")}),(0,a.jsx)("div",{className:f().divider}),(0,a.jsx)("button",{type:"button",className:f().learnMore,onClick:c,children:u("billing.watermarkDownload.learnMore")})]}),(0,a.jsxs)("div",{className:f().actions,children:[(0,a.jsx)("button",{type:"button",className:f().keepMark,onClick:l,children:u("billing.watermarkDownload.keepMark")}),(0,a.jsx)("button",{type:"button",className:f().upgrade,onClick:s,children:u("billing.watermarkDownload.upgrade")})]})]})]})}),document.body)}function p({open:e,...t}){return e?(0,a.jsx)(m,{...t}):null}var w=r(80028),g=r(42548),x=r(1974),b=r(40817),k=r(90439),v=r(28971);let y=(0,n.createContext)(null);function _({children:e}){let t=(0,x.T_)(),[r,o]=(0,n.useState)(null),i=(0,n.useRef)(null),l=e=>{i.current?.settle(e),i.current=null,o(null)},s=(0,n.useCallback)(e=>new Promise(r=>{i.current?.settle(!1);let a={...e,settle:r,owner:t};i.current=a,o(a)}),[t]);(0,n.useEffect)(()=>()=>{i.current?.settle(!1),i.current=null},[t]);let c=()=>
1{l(!1),w.y.getState().openPricing()};return(0,a.jsxs)(y.Provider,{value:s,children:[e,(0,a.jsx)(p,{open:!!r&&!!t&&r.owner===t,previewUrl:r?.previewUrl,effectPreviewUrl:r?.effectPreviewUrl,onClose:()=>l(!1),onDownloadWatermarked:()=>l(!0),onUpgrade:c,onLearnMore:c})]})}function C(){let e=(0,x.T_)(),t=(0,n.useContext)(b.u0),r=(0,b.y1)(),a=(0,n.useContext)(y),o=e?.epoch;return(0,n.useCallback)(async(n,i=r,l={})=>{let s=t.enabled?(0,k.k$)(i,t.policy).match(n):{kind:"legacy"},c=()=>!e||e.epoch===o;if(!c())throw new DOMException("Scope changed","AbortError");if(l.authorizedManifest)return{url:n,registered:!0,isCurrent:c};if("legacy"===s.kind)return{url:(0,g.y_)(n),registered:!1,isCurrent:c};if("registered"!==s.kind||!e)throw Error("Media unavailable");await e.refresh(s.reference);let d=e.getSnapshot(s.reference.fileId).access;if(!c()||d?.status!=="ready")throw Error("Media unavailable");if("watermarked"===d.variant&&!1!==l.prompt){if(!await a?.({previewUrl:"image"===d.mediaType?d.url:d.posterUrl,effectPreviewUrl:d.effectPreviewUrl})||!c())throw new DOMException("Download cancelled","AbortError");if(await e.refresh(s.reference),d=e.getSnapshot(s.reference.fileId).access,!c()||d?.status!=="ready")throw Error("Media unavailable")}return{url:d.downloadUrl,registered:!0,isCurrent:c}},[e,o,t,r,a])}},55853:(e,t,r)=>{"use strict";r.d(t,{V:()=>x,y:()=>g});var a=r(95155),n=r(12115),o=r(89932),i=r(42623),l=r(89045),s=r(35850),c=r(28993),d=r(73321),u=r(60456),f=r(12971);function h(e){return e.startsWith("/chat")?"chat":e.startsWith("/pond")||e.startsWith("/asset")?"asset":"home"}var m=r(45913),p=r(62833);let w=(0,n.createContext)(null);function g(){let e=(0,n.useContext)(w);if(!e)throw Error("useMainLayoutContext must be used within MainLayoutProvider");return e}function x({children:e}){let{t}=(0,l.s)(),r=(0,p.sr)(),{user:g,isLoading:b}=(0,i.w)(),k=!!g,[v,y]=(0,n.useState)(!1),[_,C]=(0,n.useState)(!1),S=(0,n.useCallback)(async()=>{},[]);(0,n.useEffect)(()=>{if(b)return;if(!g){y(!1),C(!1);return}let e=!1;return C(!0),(0,c.M)().then(t=>{e||y(t.isAdmin)}).catch(()=>{e||y(!1)}).finally(()=>{e||C(!1)}),()=>{e=!0}},[b,g]);let{currentView:E,loadedViews:P,navigateTo:j,isInitialized:W,pondSubPath:N}=function(){let e=(0,d.usePathname)(),[t,r]=(0,n.useState)(()=>({currentView:"home",loadedViews:new Set(["home"]),isInitialized:!1,pondSubPath:null}));(0,n.useEffect)(()=>{let t=h(e),a="asset"===t?(0,f.e3)(e):null;r(e=>{if(!e.isInitialized){let e=new Set(["home"]);return"home"!==t&&e.add(t),{currentView:t,loadedViews:e,isInitialized:!0,pondSubPath:a}}return e.currentView!==t||e.pondSubPath!==a?{...e,currentView:t,loadedViews:new Set([...e.loadedViews,t]),pondSubPath:a}:e})},[e]),(0,n.useEffect)(()=>{let e=()=>{let e=h(window.location.pathname),t="asset"===e?(0,f.e3)(window.location.pathname):null;r(r=>({...r,currentView:e,loadedViews:new Set([...r.loadedViews,e]),pondSubPath:t}))};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[]);let a=(0,n.useCallback)((e,t)=>{let a=function(e,t){switch(e){case"chat":return"/chat";case"asset":return t?`/pond/${t}`:"/pond";default:return(0,u.Tq)((0,u.E6)(),"/")}}(e,t);window.location.pathname!==a&&window.history.pushState({view:e,subPath:t},"",a),r(r=>({...r,currentView:e,loadedViews:new Set([...r.loadedViews,e]),pondSubPath:"asset"===e?t??null:null}))},[]),o=(0,n.useCallback)(e=>{r(t=>t.loadedViews.has(e)?t:{...t,loadedViews:new Set([...t.loadedViews,e])})},[]);return{...t,navigateTo:a,preloadView:o}}(),M=(0,n.useCallback)(async e=>{if(!b)try{await (0,s.D8)(e)}catch{o.o.error(t("chat.errors.loginFailed"))}},[b,t]),D=(0,n.useCallback)(async()=>{r(p.T_);try{await (0,s.CI)(),window.location.href="/"}catch{o.o.error(t("chat.errors.logoutFailed"))}},[t,r]),I=(0,n.useCallback)(()=>{j("chat")},[j]);return(0,a.jsx)(w.Provider,{value:{isAuthenticated:k,isAuthLoading:b,user:g,isAdmin:v,isAdminLoading:_,onLogin:M,onLogout:D,accessStatus:k?"approved":null,isActivated:k,accessStatusLoading:!1,waitlistTotalCount:void 0,refreshAccessStatus:S,currentView:E,navigateTo:j,onNavigateToChat:I,loadedViews:P,isInitialized:W,pondSubPath:N},children:(0,a.jsx)(m.Tn,{userId:g?.id??null,children:e})})}},72009:(e,t,r)=>{"use strict";r.d(t,{default:()=>J});var a=r(95155),n=r(12115),o=r(5785),i=r(89045),l=r(42623),s=r(25718),c=r(68185),d=r(96978),u=r(1974),f=r(40817),h=r(50201);function m({children:e}){let t=(0,l.A)(),r=(0,s.o7)(s.CS),o=r&&!r.isPersonal||!!(0,c.vU)(),i=(0,n.useMemo)(()=>({apiOrigin:window.location.origin}),[]),d=!o&&t.isVerified&&t.user?{userId:t.user.id,workspaceId:r?.id??null}:null,w=(0,n.useMemo)(()=>({enabled:!o,policy:i}),[o,i]);return(0,a.jsx)(f.u0.Provider,{value:w,children:(0,a.jsxs)(u.i8,{identity:d,policy:i,children:[(0,a.jsx)(p,{}),(0,a.jsx)(h.A8,{children:e})]})})}function p(){let e=(0,u.T_)(),{billingInfo:t,isLoading:r,isRefreshing:a,error:l}=(0,d.w)(),{t:s}=(0,i.s)(),c=(0,n.useRef)(null),f=t?`${t.plan}:${t.subscription?.id??""}:${t.subscription?.current_period_end??""}`:null;return(0,n.useEffect)(()=>()=>{c.current?.stop(),c.current=null},[e]),(0,n.useEffect)(()=>{var n;let i,d,u,h,m;if(!e||!f||r||a||l||c.current?.key===f)return;
1c.current?.stop(),e.invalidate();let p=t?.plan==="free"?()=>{}:(n=()=>{o.oR.info(s("mediaAccess.entitlementPending"),{action:{label:s("mediaAccess.refreshAction"),onClick:()=>{c.current?.key===f&&e.refreshLocked()}}})},d=e.epoch,u=Date.now()+6e4,h=!1,m=async()=>{if(h||e.epoch!==d)return;let t=await e.refreshLocked();if(!h&&e.epoch===d&&t){if(Date.now()>=u)return void n();i=setTimeout(()=>{m()},Math.min(5e3,u-Date.now()))}},i=setTimeout(()=>{m()},5e3),()=>{h=!0,clearTimeout(i)});c.current={key:f,stop:p}},[e,f,r,a,l,t?.plan,s]),null}var w=r(37206),g=r(40980),x=r(41440),b=r(88861),k=r(36039),v=r(70872);let y=(0,w.default)(()=>Promise.all([r.e(5004),r.e(277),r.e(733),r.e(9356),r.e(8306),r.e(2419),r.e(6269),r.e(3230),r.e(4741)]).then(r.bind(r,96505)).then(e=>({default:e.FeedbackIssuePanel})),{loadableGenerated:{webpack:()=>[96505]}});function _({isAuthenticated:e=!1,isDarkMode:t=!1,currentView:r,allowViewCreatedIssue:o=!1}){let{t:l}=(0,i.s)(),s=(0,k.a)(),[c,d]=(0,n.useState)(!1),[u,f]=(0,n.useState)(!1);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(v.m_,{children:[(0,a.jsx)(v.k$,{asChild:!0,children:(0,a.jsxs)("button",{type:"button","aria-label":l("issues.feedback"),onClick:()=>{f(!0),d(!0)},className:(0,g.cn)("fixed z-40 flex items-center justify-center transition-transform active:scale-[0.98]",s&&"chat"===r?"bottom-[calc(env(safe-area-inset-bottom,0px)+92px)] right-3 size-10":"bottom-[calc(env(safe-area-inset-bottom,0px)+16px)] right-3 size-10","md:bottom-7 md:right-7 md:size-8"),children:[(0,a.jsx)("span",{"data-node-id":"9638:114971",className:(0,g.cn)("flex size-8 items-center justify-center rounded-full border-[0.5px] transition-colors",t?"border-white/10 bg-white/10 text-white/55 shadow-[0px_0px_12px_rgba(0,0,0,0.12),0px_0px_32px_rgba(0,0,0,0.12)] backdrop-blur-[16px] hover:bg-white/15":"border-[rgba(0,0,0,0.08)] bg-[#f3f3f1] text-black/50 shadow-[0px_0px_4px_rgba(0,0,0,0.04)] hover:bg-[#f7f7f5]"),children:(0,a.jsx)("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",className:(0,g.cn)("shrink-0",t?"text-white/55":"text-black/50"),children:(0,a.jsx)("path",{d:"M7.00103 10.7918C7.2331 10.7918 7.45566 10.884 7.61975 11.0481C7.78384 11.2122 7.87603 11.4348 7.87603 11.6668C7.87603 11.8989 7.78384 12.1215 7.61975 12.2855C7.45566 12.4496 7.2331 12.5418 7.00103 12.5418H6.9987C6.76663 12.5418 6.54407 12.4496 6.37998 12.2855C6.21589 12.1215 6.1237 11.8989 6.1237 11.6668C6.1237 11.4348 6.21589 11.2122 6.37998 11.0481C6.54407 10.884 6.76663 10.7918 6.9987 10.7918H7.00103ZM6.9987 1.4585C8.00431 1.4585 8.96874 1.85797 9.67981 2.56905C10.3909 3.28012 10.7904 4.24455 10.7904 5.25016C10.7904 6.35616 10.1055 7.35308 9.11036 7.92066C8.73878 8.133 8.41037 8.37683 8.18345 8.63816C7.96178 8.89308 7.8737 9.12116 7.8737 9.3335C7.8737 9.56556 7.78151 9.78812 7.61742 9.95221C7.45332 10.1163 7.23076 10.2085 6.9987 10.2085C6.76663 10.2085 6.54407 10.1163 6.37998 9.95221C6.21589 9.78812 6.1237 9.56556 6.1237 9.3335C6.1237 8.57925 6.45445 7.96033 6.8622 7.49016C7.2647 7.02641 7.7757 6.66766 8.24353 6.40108C8.80295 6.08141 9.04037 5.61066 9.04037 5.25016C9.04037 4.98205 8.98756 4.71656 8.88495 4.46885C8.78235 4.22114 8.63196 3.99607 8.44237 3.80649C8.25279 3.6169 8.02772 3.46651 7.78001 3.36391C7.5323 3.26131 7.26681 3.2085 6.9987 3.2085C6.73058 3.2085 6.46509 3.26131 6.21739 3.36391C5.96968 3.46651 5.74461 3.6169 5.55502 3.80649C5.36544 3.99607 5.21505 4.22114 5.11244 4.46885C5.00984 4.71656 4.95703 4.98205 4.95703 5.25016C4.95703 5.36507 4.9344 5.47885 4.89043 5.58501C4.84645 5.69117 4.782 5.78763 4.70075 5.86888C4.6195 5.95013 4.52304 6.01458 4.41688 6.05856C4.31072 6.10253 4.19694 6.12516 4.08203 6.12516C3.96712 6.12516 3.85334 6.10253 3.74718 6.05856C3.64102 6.01458 3.54456 5.95013 3.46331 5.86888C3.38206 5.78763 3.31761 5.69117 3.27364 5.58501C3.22966 5.47885 3.20703 5.36507 3.20703 5.25016C3.20703 4.24455 3.60651 3.28012 4.31758 2.56905C5.02866 1.85797 5.99309 1.4585 6.9987 1.4585Z",fill:"currentColor"})})}),(0,a.jsx)("span",{className:"sr-only",children:l("issues.feedback")})]})}),!s&&(0,a.jsx)(v.ZI,{side:"top",align:"end",sideOffset:4,className:"rounded-[8px] bg-[#252627] px-3 pb-1 pt-[5px] text-[14px] font-bold leading-5 text-white shadow-none",children:l("issues.feedback")})]}),u?(0,a.jsx)(y,{open:c,onClose:()=>d(!1),onIssueCreated:()=>d(!1),sourceContext:e?"floating_feedback_button":"floating_feedback_button_guest",allowViewCreatedIssue:o}):null]})}var C=r(18555),S=r(7603),E=r(62833);let P="442208800666-i116qvjvm76igm983m79shml2fjbkihg.apps.googleusercontent.com",j="https://accounts.google.com/gsi/client";function W({onSuccess:e}){let t=(0,n.useRef)(!1),r=(0,E.lq)();async function a(t){try{let a=await (0,C.Y)(),n=await fetch("/api/v1/openauth/google/one-tap",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({credential:t.credential,...a})});if(!n.ok)return void S.v.error("[GoogleOneTap] Backend error",{status:n.status});let o=await n.json().catch(()=>({})),i=!0===o.is_new;
1S.v.info("[GoogleOneTap] Login successful"),o.user?.id&&r?.setUserId(o.user.id),r?.track(E.CM,{method:"google_one_tap",is_new:i,registration:i?"google_one_tap":void 0},{immediate:!0}),(0,E.ww)({type:"login"}),i&&(0,E.ww)({type:"sign_up"}),e?e():i?window.setTimeout(()=>window.location.reload(),600):window.location.reload()}catch(e){S.v.error("[GoogleOneTap] Request failed",e instanceof Error?e:Error(String(e)))}}function o(e){e.isNotDisplayed()?S.v.debug?.("[GoogleOneTap] Not displayed",{reason:e.getNotDisplayedReason()}):e.isSkippedMoment()&&S.v.debug?.("[GoogleOneTap] Skipped",{reason:e.getSkippedReason()})}return(0,n.useEffect)(()=>{let e;if(!P)return;let r=()=>{t.current||(t.current=!0,new Promise((e,t)=>{if("u">typeof google&&google.accounts?.id)return void e();let r=document.querySelector(`script[src="${j}"]`);if(r)return void("1"===r.dataset.loaded?e():(r.addEventListener("load",()=>e()),r.addEventListener("error",()=>t(Error("GSI SDK load failed")))));let a=document.createElement("script");a.src=j,a.async=!0,a.onload=()=>{a.dataset.loaded="1",e()},a.onerror=()=>t(Error("GSI SDK load failed")),document.head.appendChild(a)}).then(()=>{google.accounts.id.initialize({client_id:P,callback:a,auto_select:!0,cancel_on_tap_outside:!0,use_fedcm_for_prompt:!1,itp_support:!0}),google.accounts.id.prompt(o)}).catch(e=>{S.v.error("[GoogleOneTap] Failed to load SDK",e)}))},n=()=>{e="function"==typeof window.requestIdleCallback?window.requestIdleCallback(r,{timeout:3e3}):window.setTimeout(r,1500)},i=()=>n();return"complete"===document.readyState?n():window.addEventListener("load",i,{once:!0}),()=>{window.removeEventListener("load",i),void 0!==e&&("function"==typeof window.cancelIdleCallback?window.cancelIdleCallback(e):clearTimeout(e)),"u">typeof google&&google.accounts?.id&&google.accounts.id.cancel()}},[]),null}var N=r(12968),M=r(38604),D=r(55853),I=r(80028),L=r(31660),T=r(32508),R=r(60986),U=r(60456);let O=(0,w.default)(()=>Promise.all([r.e(9545),r.e(6136),r.e(5151),r.e(4262),r.e(7123),r.e(2634),r.e(5537),r.e(6386),r.e(4769),r.e(4240),r.e(8345),r.e(114),r.e(4297)]).then(r.bind(r,114)),{loadableGenerated:{webpack:()=>[114]}}),A=(0,w.default)(()=>Promise.all([r.e(3962),r.e(4155),r.e(7765)]).then(r.bind(r,37765)).then(e=>({default:e.PricingPageClient})),{loadableGenerated:{webpack:()=>[37765]}}),V=(0,w.default)(()=>r.e(4155).then(r.bind(r,54155)).then(e=>({default:e.RechargeDialog})),{loadableGenerated:{webpack:()=>[54155]}}),$=(0,w.default)(()=>r.e(434).then(r.bind(r,30434)).then(e=>({default:e.GiftPageClient})),{loadableGenerated:{webpack:()=>[30434]}}),G=(0,w.default)(()=>Promise.all([r.e(3962),r.e(492)]).then(r.bind(r,10492)),{loadableGenerated:{webpack:()=>[10492]}}),F=(0,w.default)(()=>Promise.all([r.e(6498),r.e(4262),r.e(7123),r.e(5004),r.e(277),r.e(5537),r.e(733),r.e(9356),r.e(5287),r.e(1907),r.e(643),r.e(3384),r.e(8280),r.e(9092),r.e(8306),r.e(6386),r.e(7091),r.e(2419),r.e(4769),r.e(3213),r.e(4240),r.e(7195),r.e(6269),r.e(3510),r.e(629),r.e(9516),r.e(4155),r.e(3230),r.e(4133),r.e(3936),r.e(4928),r.e(6751),r.e(663),r.e(2402),r.e(8430)]).then(r.bind(r,40641)),{loadableGenerated:{webpack:()=>[40641]}}),B=(0,w.default)(()=>Promise.all([r.e(4262),r.e(7123),r.e(5004),r.e(277),r.e(5537),r.e(9356),r.e(5287),r.e(1907),r.e(8280),r.e(8306),r.e(6386),r.e(7091),r.e(4769),r.e(3213),r.e(4240),r.e(7195),r.e(3510),r.e(629),r.e(4133),r.e(4928),r.e(3423),r.e(2402),r.e(368)]).then(r.bind(r,3330)).then(e=>({default:e.AssetClient})),{loadableGenerated:{webpack:()=>[3330]}});function z(){let e=(0,I.y)(e=>e.pricingOpen),t=(0,I.y)(e=>e.pricingInitialRecharge),r=(0,I.y)(e=>e.pricingTrigger),n=(0,I.y)(e=>e.closePricing);return e?(0,a.jsx)("div",{className:"animate-in zoom-in-95 fade-in fixed inset-0 z-[100] duration-200",children:(0,a.jsx)(A,{onClose:n,initialRecharge:t,source:"modal",trigger:r??void 0})}):null}function q(){let e=(0,I.y)(e=>e.rechargeOpen),t=(0,I.y)(e=>e.rechargeSource),r=(0,I.y)(e=>e.closeRecharge);return e?(0,a.jsx)(V,{onClose:r,source:t??"unknown"}):null}function K(){let e=(0,I.y)(e=>e.giftOpen),t=(0,I.y)(e=>e.closeGift);return e?(0,a.jsx)($,{onClose:t}):null}function H({children:e}){let{isDarkMode:t,toggleTheme:r}=(0,x.DP)(),o=(0,I.y)(e=>e.settingsOpen),i=(0,I.y)(e=>e.closeSettings),{isAuthenticated:l,isAuthLoading:s,isAdmin:c,user:d,onLogin:u,onLogout:f,isActivated:h,accessStatusLoading:p,refreshAccessStatus:w,currentView:k,navigateTo:v,loadedViews:y,isInitialized:C,pondSubPath:S}=(0,D.y)(),P=(0,E.lq)(),j=(0,E.sr)(),U=(0,R.r)(e=>e.isOpen),A=(0,I.y)(e=>e.pricingOpen),V=(0,I.y)(e=>
1e.giftOpen),[$,J]=(0,n.useState)({userId:null,isBlocking:!0}),X=(0,n.useCallback)(e=>{J({userId:d?.id??null,isBlocking:e})},[d?.id]);(0,n.useEffect)(()=>{if(P&&(P.setUserId(d?.id??null),d?.id&&1)){let e=P.getAnonymousId(),t=`ribbi.analytics.identity_linked.${d.id}.${e}`;try{window.localStorage.getItem(t)||(window.localStorage.setItem(t,"1"),j(E.jn,{anonymous_id:e},{immediate:!0}))}catch{j(E.jn,{anonymous_id:e},{immediate:!0})}}},[P,j,d?.id]),(0,n.useEffect)(()=>{P&&"chat"!==k&&P.setConversationId(null)},[P,k]);let Q=(0,M.aL)(e=>e.pendingMessage),Y=(0,M.aL)(e=>e.hydratePendingMessage),[Z,ee]=(0,n.useState)(!1);(0,n.useEffect)(()=>{C&&!s&&("home"===k||l||v("home"))},[C,s,l,k,v]),(0,n.useEffect)(()=>{if(!C||s||p||"home"!==k||!l||!h||!(0,M.Qf)())return;let e=Q??Y();e?(0,M.mL)(e)&&(ee(!0),v("chat")):(0,M.to)()},[C,s,p,k,l,h,Q,Y,v]),(0,n.useEffect)(()=>{C&&!s&&l&&"chat"===k&&(0,M.to)()},[C,s,l,k]),(0,n.useEffect)(()=>{if(!C)return;let e=()=>ee(!0);return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[C]);let et="home"===k&&!Z&&null!==e,er=!C||y.has("home"),ea=C&&"home"!==k?"hidden":"h-full";return(0,a.jsx)(m,{children:(0,a.jsx)(N.u,{children:(0,a.jsxs)("div",{className:(0,g.cn)("flex h-full flex-col overflow-hidden bg-[var(--background)] font-trap","home"===k&&"[--home-background-tail:#f3f4f1] dark:[--home-background-tail:#030303]","home"===k&&"home-page-background"),children:[(0,a.jsx)(b.j,{isDarkMode:t,onToggleDarkMode:()=>{r(),j(E.t7,{to:t?"light":"dark"})},user:d,isAdmin:c,onLogin:u,onLogout:f,isAuthenticated:l,isAuthLoading:s,currentView:C?k:void 0,isHomePage:"home"===k,onNavigate:e=>{if("home"!==e){if(s)return;if(!l)return void u();if(!h)return}ee(!0),v(e)},isActivated:p||h,accessStatusLoading:p,onAccessStatusRefresh:w}),(0,a.jsxs)("main",{className:"flex-1 min-h-0 relative",children:[er&&(0,a.jsx)("div",{className:ea,children:et||!C?e:(0,a.jsx)(O,{})}),C&&y.has("chat")&&(0,a.jsx)("div",{className:"chat"===k?"h-full":"hidden",children:(0,a.jsx)(F,{})}),C&&y.has("asset")&&(0,a.jsx)("div",{className:"asset"===k?"h-full":"hidden",children:(0,a.jsx)(B,{pondSubPath:S,navigateTo:v})})]}),!l&&!s&&!U&&(0,a.jsx)(W,{}),l?(0,a.jsx)(_,{isAuthenticated:l,isDarkMode:t,currentView:k,allowViewCreatedIssue:c}):null,(0,a.jsx)(z,{}),(0,a.jsx)(q,{}),(0,a.jsx)(K,{}),(0,a.jsx)(T.b,{isOpen:o,onClose:i,isDarkMode:t}),l&&(0,a.jsx)(L.lW,{onBlockingChange:X}),l&&C&&"home"===k&&d?.id?(0,a.jsx)(G,{enabled:function({pricingOpen:e,giftOpen:t,workspaceNoticeCheckedForCurrentUser:r,workspaceNoticeBlocking:a}){return!e&&!t&&r&&!a}({pricingOpen:A,giftOpen:V,workspaceNoticeCheckedForCurrentUser:$.userId===d.id,workspaceNoticeBlocking:$.isBlocking}),userId:d.id}):null]})})})}function J({children:e}){let{locale:t}=(0,i.s)();return(0,n.useEffect)(()=>{document.documentElement.lang=(0,U.kA)(t)},[t]),(0,a.jsx)(D.V,{children:(0,a.jsx)(H,{children:e})})}},98943:e=>{e.exports={dialog:"WatermarkDownloadModal_dialog___ejzg",card:"WatermarkDownloadModal_card__gbfwU",preview:"WatermarkDownloadModal_preview__Rcgyg",image:"WatermarkDownloadModal_image__9xdER",previewFallback:"WatermarkDownloadModal_previewFallback__YK3Q6",details:"WatermarkDownloadModal_details__BCPYg",header:"WatermarkDownloadModal_header__SSmla",title:"WatermarkDownloadModal_title__yskX6",description:"WatermarkDownloadModal_description__4o7XR",benefit:"WatermarkDownloadModal_benefit__xsBhK",benefitTitle:"WatermarkDownloadModal_benefitTitle__keiVA",divider:"WatermarkDownloadModal_divider__S5ac_",learnMore:"WatermarkDownloadModal_learnMore__GFTWB",keepMark:"WatermarkDownloadModal_keepMark__dZFam",upgrade:"WatermarkDownloadModal_upgrade__WSZ0t",actions:"WatermarkDownloadModal_actions__P0O72"}}}]);

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.