PageSourceSearch

https://narcis.ai/assets/Notice-3Y3qDIlk.js

js narcis.ai collected 2026-10-05 12:18:11 UTC 13,708 bytes, 2 lines download raw bytes

1import{F as e,V as t,W as n,i as r,t as i}from"./jsx-runtime-baFwlgpV.js";import{a}from"./analytics-D0YRr8ph.js";import{t as o}from"./routes-CSqgk7mk.js";import{i as s,r as c,t as l}from"./contract-BbIfjQpF.js";import{n as ee,t as u}from"./storage-B2L0luFW.js";import{t as d}from"./classnames-BCYYfyfP.js";import{n as f}from"./imageProcessing-DFvRqmfE.js";import{n as p,r as m,t as h}from"./narcisIntakeEvent-DqmM0mft.js";var g=n(t(),1);function _(e,t){if(t||e.status===`accepted`)return`fire`;switch(e.status){case`idle`:return`ask`;case`asked`:return`focus_checkbox`;case`ticked`:return`accept_then_fire`;default:return`ask`}}function te(e,t){switch(t.type){case`PRESS`:return _(e,t.accepted)===`ask`?{status:`asked`,hasPending:!0}:e;case`TICK`:return e.status!==`asked`&&e.status!==`ticked`?e:{status:t.checked?`ticked`:`asked`,hasPending:e.hasPending};case`ACCEPTED`:return{status:`accepted`,hasPending:!1};case`FOLD`:return e;default:return e}}var ne={status:`idle`,hasPending:!1};function v(e,t){return e??t}function y(e){return e===`ask`||e===`focus_checkbox`}function b({house:e,surface:t}){let[n,r]=(0,g.useReducer)(te,ne),[i,o]=(0,g.useState)(!1),[s,c]=(0,g.useState)(!1),[l,d]=(0,g.useState)(0),f=(0,g.useRef)(null),p=(0,g.useRef)(!1),m=(0,g.useRef)(n);m.current=n;let h=(0,g.useRef)(s);h.current=s,(0,g.useEffect)(()=>{let t=u(e);h.current=t,c(t)},[]);let b=s||n.status===`accepted`,x=n.status===`ticked`||n.status===`accepted`,S=(n.status===`asked`||n.status===`ticked`)&&!i;function C(n){let i=m.current,s=h.current||i.status===`accepted`,l=_(i,s);if(l===`fire`){n?.();return}if(l===`ask`){f.current=n??null,o(!1),r({type:`PRESS`,accepted:s}),y(l)&&d(e=>e+1),a(`consent_shown`,{house:e,surface:t});return}if(l===`focus_checkbox`){o(!1),y(l)&&d(e=>e+1);return}if(p.current)return;p.current=!0,ee(e),h.current=!0,c(!0),r({type:`ACCEPTED`}),a(`consent_accepted`,{house:e,surface:t});let u=f.current;f.current=null,v(n,u)?.()}function w(e){r({type:`TICK`,checked:e})}function T(){o(!0),f.current=null,r({type:`FOLD`})}return{status:n.status,checked:x,open:S,accepted:b,press:C,tick:w,fold:T,cardProps:{checked:x,onTick:w,autoFocus:!0,focusToken:l}}}var x=i();function S({styles:e,checked:t,onTick:n,autoFocus:i=!0,focusToken:a,termsHref:o,privacyHref:s,copy:c}){let l=(0,g.useRef)(null);return(0,g.useEffect)(()=>{if(!i)return;let e=l.current;e&&e.offsetParent!==null&&e.focus()},[a]),(0,x.jsxs)(`div`,{className:e.card,children:[(c.title||c.sub)&&(0,x.jsxs)(`div`,{children:[c.title&&(0,x.jsx)(`div`,{className:e.title,children:c.title}),c.sub&&(0,x.jsx)(`div`,{className:e.sub,children:c.sub})]}),(0,x.jsxs)(`label`,{className:e.checkbox,children:[(0,x.jsx)(`input`,{ref:l,type:`checkbox`,checked:t,onChange:e=>n(e.target.checked)}),(0,x.jsxs)(`span`,{children:[c.attestation,` `,(0,x.jsx)(r,{to:o,onClick:e=>e.stopPropagation(),children:c.termsLabel}),` `,c.conjunction,` `,(0,x.jsx)(r,{to:s,onClick:e=>e.stopPropagation(),children:c.policyLabel})]})]})]})}var C={card:`_card_5ye0k_255`,title:`_title_5ye0k_265`,sub:`_sub_5ye0k_273`,checkbox:`_checkbox_5ye0k_279`},w={ghost:`_ghost_1et0j_1`,split:`_split_1et0j_25`,rule:`_rule_1et0j_29`,ownRow:`_ownRow_1et0j_38`,verb:`_verb_1et0j_45`,pen:`_pen_1et0j_53`,words:`_words_1et0j_66`,cta:`_cta_1et0j_75`},T=`Make a picture from`;function E(){return(0,x.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,x.jsx)(`path`,{d:`M17 3 a2.83 2.83 0 0 1 4 4 L7.5 20.5 L2 22 L3.5 16.5 Z`})})}function re({words:e,atRest:t,onTap:n,door:r=null}){return r?(0,x.jsxs)(`button`,{type:`button`,className:w.ghost,style:{aspectRatio:`2 / 3`},onClick:n,"aria-label":r.label,children:[r.line!==null&&(0,x.jsx)(`span`,{className:w.words,children:r.line}),(0,x.jsx)(`span`,{className:w.cta,children:r.cta})]}):e.trim().length>0?(0,x.jsxs)(`button`,{type:`button`,className:w.ghost,style:{aspectRatio:`2 / 3`},onClick:n,"aria-label":`${T}: ${e}`,children:[(0,x.jsx)(`span`,{className:w.pen,"aria-hidden":`true`,children:(0,x.jsx)(E,{})}),(0,x.jsx)(`span`,{className:w.verb,children:T}),(0,x.jsx)(`span`,{className:w.words,children:e})]}):t.rule?(0,x.jsxs)(`button`,{type:`button`,className:`${w.ghost} ${w.split}`,style:{aspectRatio:`2 / 3`},onClick:n,"aria-label":`${t.rule} ${t.own}`,children:[(0,x.jsx)(`span`,{className:w.rule,children:t.rule}),(0,x.jsxs)(`span`,{className:w.ownRow,children:[(0,x.jsx)(`span`,{className:w.pen,"aria-hidden":`true`,children:(0,x.jsx)(E,{})}),(0,x.jsx)(`span`,{className:w.words,children:t.own})]})]}):(0,x.jsxs)(`button`,{type:`button`,className:w.ghost,style:{aspectRatio:`2 / 3`},onClick:n,"aria-label":`${T}: ${t.own}`,children:[(0,x.jsx)(`span`,{className:w.pen,"aria-hidden":`true`,children:(0,x.jsx)(E,{})}),(0,x.jsx)(`span`,{className:w.words,children:t.own})]})}function ie(){try{return crypto.randomUUID()}catch{return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,12)}`}}var D=`ghost`;function O(e){return`tile:${e}`}function k(e){return`scratch:${e}`}function A(e){return e.root_tile_id===null?k(e.root_id):O(e.root_tile_id)}function j(e){return e.kind===`ghost`?null:e}function M(e){return e.kind===`ghost`?D:e.kind===`tile`?O(e.tileId):k(e.rootId)}function N(e){let t=Date.parse(e.created_at);return Number.isNaN(t)?0:t}function P(e,t){return t===null||N(e)>N(t)}function ae(e,t=[]){let n=new Map;if(!e)return n;for(let r of[...e.done,...e.pending,...e.matched??[],...t]){let e=A(r),t=n.get(e);t||(t={key:e,rootTileId:r.root_tile_id,rootId:r.root_id,root:null,newestDone:null,running:null,failedUnseen:null,latestAt:0},n.set(e,t)),r.root&&!t.root&&(t.root=r.root),t.latestAt=Math.max(t.latestAt,N(r)),r.status===`done`?P(r,t.newestDone)&&(t.newestDone=r):r.status===`failed`?r.seen_at===null&&P(r,t.failedUnseen)&&(t.failedUnseen=r):P(r,t.running)&&(t.running=r)}return n}function oe(e){let t=null,n=null;for(let r of e?.pending??[])r.status===`rendering`?P(r,t)&&(t=r):r.status===`queued`&&(n===null||N(r)<N(n))&&(n=r);return t??n}function se(e){return(e?.done??[]).filter(e=>e.seen_at===null).sort((e,t)=>
1N(t)-N(e))}function ce(e){if(e?.done.length)return e.done[0];let t=null;for(let n of e?.pending??[])P(n,t)&&(t=n);return t}function le(e){let t=new Map;for(let n of F(e))t.set(A(n),n.id);return t}function ue(e,t){return t.get(A(e))===e.id}function F(e){let t=new Map;for(let n of e){let e=A(n);P(n,t.get(e)??null)&&t.set(e,n)}return[...t.values()].sort((e,t)=>N(t)-N(e))}function I(e,t){return t?F([...e?.done??[],...e?.pending??[]].filter(e=>e.batch_id===t)).sort((e,t)=>(e.position??0)-(t.position??0)||N(e)-N(t)):[]}function de(e){for(let t of e)if(t.root)return t.root;return null}function L(e,t){let n=null;for(let r of t){let t=e.get(r.id);t&&t.status===r.status&&t.seen_at===r.seen_at&&t.pinned_at===r.pinned_at||(n??=new Map(e),n.set(r.id,r))}return n??e}function R(e,t){return L(e,[...t?.done??[],...t?.pending??[]])}function z(e,t){return t.filter(t=>{let n=e.get(t.id);return!!n&&(n.status===`queued`||n.status===`rendering`)})}function B(e,t){return[...e.values()].filter(e=>e.status!==`failed`&&A(e)===t).sort((e,t)=>N(e)-N(t)||(e.id<t.id?-1:+(e.id>t.id)))}function V(e){return`basis:${e}`}function H(e){return{kind:`take`,id:e.id,take:e}}function fe(e,t){let n=e.map(H);return t&&n.unshift({kind:`basis`,id:V(t.id),tile:t}),n}function U(e,t){if(t){let n=e.find(e=>e.id===t);if(n)return n}return e.length>0?e[e.length-1]:null}function W(e,t,n){return t?e:n?.running?H(n.running):n?.newestDone?H(n.newestDone):null}function pe(e,t){let n=U(e,t),r=n?e.findIndex(e=>e.id===n.id):-1;return{index:r,total:e.length,step:n,prev:r>0?e[r-1]:null,next:r>=0&&r<e.length-1?e[r+1]:null}}function G(e,t,n=null){if(n)return n;let r=t.get(M(e));return r?.newestDone?r.newestDone.id:e.kind===`scratch`?e.rootId:null}function K(e){return e.trim().slice(0,200)}function q(e,t){return!t||t.kind!==`muse`||t.slug===null?!0:e?.kind!==`take`||e.take.muse_slug===t.slug}function me(e,t,n){return e?.kind===`take`&&t.trim()===``&&q(e,n)?`again`:`generate`}function he({live:e,working:t,held:n,freshArm:r}){return r||!t||e===`generate`?e:n}function ge({armed:e,chains:t,direction:n,ratioPick:r,houseRatio:i,from:a=null,identity:o=null}){let s=K(n),c=a?.kind===`basis`?null:G(e,t,a?.id??null),l=r??void 0;return s===``&&c?q(W(a,a!==null,t.get(M(e))),o)?{body:{again:c,...l?{ratio:l}:{}},kind:`again`}:{body:{basis:{take:c},direction:``,...l?{ratio:l}:{}},kind:`single`}:e.kind===`ghost`?{body:{basis:null,direction:s,ratio:r??i},kind:`from_ghost`}:c?{body:{basis:{take:c},direction:s,...l?{ratio:l}:{}},kind:`single`}:{body:{basis:{tile:e.kind===`tile`?e.tileId:0},direction:s,...l?{ratio:l}:{}},kind:`single`}}function _e(e){return J(e)}function J(e){if(typeof e!=`object`||!e)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(J).join(`,`)}]`;let t=e;return`{${Object.keys(t).sort().map(e=>`${JSON.stringify(e)}:${J(t[e])}`).join(`,`)}}`}function ve(e,t,n=400){return e!==null&&t.bodyKey===e.bodyKey&&t.at-e.at<n}var Y={"1:1":{width:1,height:1},"2:3":{width:2,height:3},"3:4":{width:3,height:4},"16:9":{width:16,height:9},"9:16":{width:9,height:16},"21:9":{width:21,height:9}};function X(e){return Y[e]??Y[`2:3`]}function Z(e){return e.width>0&&e.height>0?e.width/e.height:2/3}function ye(e,t=c){let n=Math.log(Z(e)),r=t[0]??`2:3`,i=1/0;for(let e of t){let t=Math.abs(Math.log(Z(X(e)))-n);t<i&&(i=t,r=e)}return r}function be(e,t,n){return e??ye(t,n)}function xe({armed:e,chains:t,basis:n,displayed:r=null,inFlight:i=null,ratioPick:a,houseRatio:o}){if(i&&i.width>0&&i.height>0)return{width:i.width,height:i.height};if(a)return X(a);if(r?.kind===`basis`&&r.tile.width>0&&r.tile.height>0)return{width:r.tile.width,height:r.tile.height};let s=t.get(M(e)),c=(r?.kind===`take`?r.take:null)??s?.newestDone??s?.running??null;return c&&c.width>0&&c.height>0?{width:c.width,height:c.height}:n&&n.width>0&&n.height>0?{width:n.width,height:n.height}:X(o)}function Se(e,t){if(e.kind===`ghost`)return null;let n=G(e,t);return e.kind===`scratch`?{take:n??e.rootId}:{tile:e.tileId}}function Ce(e,t){return e.kind===`ghost`?null:e.kind===`tile`?e.tileId:t.get(M(e))?.rootTileId??null}function we(e){return e.batch_id===null?e.root_tile_id===null&&e.parent_id===null?`from_ghost`:`single`:`pack`}function Te(e,t,n){let r=new URLSearchParams;e.kind===`tile`&&r.set(`basis`,String(e.tileId));let i=K(t);i&&r.set(`direction`,i),n&&r.set(`ratio`,n);let a=r.toString();return a?`/?${a}`:`/`}function Ee(e){return e?e.kind!==`muse`||e.slug!==null:!0}function De(e,t,n){if(e===0||e>=500)return`failed`;switch(t){case`rate_limited`:return`try again in a minute`;case`invalid_body`:return n===`direction`?`too long`:`not accepted`;case`not_found`:return`gone`;case`identity_required`:return`choose her first`;case`conflict`:return`already sent`;case`not_signed_in`:return`sign in first`;case`credits_required`:return`needs credits`;default:return e===429?`try again in a minute`:e===404?`gone`:e===400?`not accepted`:e===402?`needs credits`:`failed`}}function Oe(e,t){return e.fail_reason===`refused`?t.verbs.refused:e.fail_reason===`identity_unavailable`?`choose her first`:`failed`}function ke(e){return Ae.has(e)||Me.has(e)?`error`:je.has(e)||/training|pause/i.test(e)?`warning`:/ ready$/.test(e)?`success`:`info`}var Ae=new Set([`failed`,`too long`,`not accepted`,`gone`]),je=new Set([`try again in a minute`,`sign in first`,`choose her first`,`already sent`,`needs credits`]),Me=new Set([`not something we draw`,`not a portrait we make`,`not in her repertoire`]);function Ne(e,t){return e&&t?t.line:null}function Pe(e,t){return t?I(e,t).some(e=>e.status===`done`)?`open_column`:`scroll_to_top`:`open_column`}function Fe(e,t){return e?t.onPicture:t.onBlank}
1function Q(e,t=4){return e.trim().split(/\s+/).filter(Boolean).slice(0,t).join(` `)}function Ie(e,t){let n=e?[...e.chips]:[],r=t?Q(t):``;return r&&n.push(r),n}function Le(e){return e===`caption`}function Re(e,t,n){return{pack_slug:e,direction:K(t),request_id:n}}function ze(e){return`/?batch=${encodeURIComponent(e)}`}function Be(e){return`/?basis=${e}`}function Ve(e){let t=new URLSearchParams(e);for(let e of s)t.delete(e);for(let e of l)t.delete(e);return t}var $={arena:`_arena_10qm8_1`,scrim:`_scrim_10qm8_10`,panel:`_panel_10qm8_16`,close:`_close_10qm8_27`};function He({onClose:t,signedIn:n,signupRedirectTo:r=`/`}){let i=e(`root`)?.funnel,a=m({onEvent:h,compress:f});return i?(0,x.jsxs)(`div`,{className:$.arena,children:[(0,x.jsx)(`div`,{className:$.scrim,onClick:()=>t()}),(0,x.jsxs)(`div`,{className:$.panel,role:`document`,children:[(0,x.jsx)(`button`,{type:`button`,className:$.close,onClick:()=>t(),"aria-label":`Close`,children:`✕`}),(0,x.jsx)(p,{intake:a,isAuthenticated:n,funnel:i,authAction:o[`/auth/:provider`]({provider:`google`}),onDone:()=>t({queued:!0}),signupRedirectTo:r})]})]}):null}var Ue=n(d(),1),We={notice:`_notice_4u9uo_1`},Ge=8e3;function Ke({kind:e,children:t,ttlMs:n=Ge,onClear:r,className:i}){let a=(0,g.useRef)(r);return a.current=r,(0,g.useEffect)(()=>{if(!n)return;let e=setTimeout(()=>a.current?.(),n);return()=>clearTimeout(e)},[t,n]),(0,x.jsx)(`p`,{role:`status`,"aria-live":`polite`,"data-kind":e,className:(0,Ue.default)(We.notice,i),children:t})}export{E as $,R as A,_e as B,F as C,De as D,be as E,z as F,W as G,Te as H,ce as I,se as J,we as K,Ne as L,Ee as M,ve as N,Oe as O,ue as P,re as Q,ke as R,pe as S,U as T,oe as U,L as V,k as W,Le as X,me as Y,ie as Z,Ie as _,Re as a,A as b,xe as c,j as d,C as et,Ce as f,ae as g,I as h,ze as i,he as j,Fe as k,Se as l,de as m,He as n,b as nt,Ve as o,N as p,O as q,Be as r,D as s,Ke as t,S as tt,M as u,le as v,ge as w,fe as x,B as y,Pe as z};
2//# sourceMappingURL=Notice-3Y3qDIlk.js.map

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.