PageSourceSearch

https://ai-headshots.net/_nuxt/DkVhDUt9.js

js ai-headshots.net collected 2026-10-08 07:43:31 UTC 3,242 bytes, 1 lines download raw bytes

1import{_ as R}from"./FQhKvbGo.js";import{aa as V,c as F,l as P,d as B,J as x,P as C,ab as $,o as w,e as k,N as b,g as l,f as c,M,B as N,h as g,w as I,x as U,k as E}from"./7hFplOzn.js";import{u as L}from"./BYiWO4d_.js";import{u as S}from"./xESAKZ-l.js";const h=new WeakMap;function D(v){const i=V(v);return F(()=>{var a,u;const s=i.value;if(!s)return"";if(h.has(s))return(a=h.get(s))==null?void 0:a.value;const r=new FileReader,t=P(""),e=()=>{var d;t.value=((d=r.result)==null?void 0:d.toString())??"",r.removeEventListener("load",e)};return r.addEventListener("load",e),r.readAsDataURL(s),h.set(s,t),(u=h.get(s))==null?void 0:u.value})}const W={class:"group/nui-file-headless relative"},A=["id"],G=B({inheritAttrs:!1,__name:"BaseInputFileHeadless",props:{modelValue:{default:void 0},id:{default:void 0},filterFileDropped:{type:Function,default:()=>!0}},emits:["update:modelValue"],setup(v,{expose:i,emit:_}){const s=v,r=_,t=P(),e=x(s,"modelValue",r,{passive:!0}),a=L(()=>s.id),u=new WeakMap;function d(){var o;(o=t.value)==null||o.click()}function n(o){o.stopPropagation(),o.preventDefault();const p=o.dataTransfer,m=new DataTransfer;if(t.value&&p){for(const y of p.files)s.filterFileDropped(y)&&m.items.add(y);t.value.files=m.files,e.value=t.value.files}}function f(o){if(!o||!e.value||!t.value)return;const p=new DataTransfer;u.has(o)&&u.delete(o);for(const m of e.value)m!==o&&p.items.add(m);t.value.files=p.files,e.value=t.value.files}return C("BaseInputFileHeadlessContext",$({el:t,id:a,files:e,open:d,remove:f,preview:D,drop:n})),i({el:t,id:a,files:e,open:d,remove:f,preview:D,drop:n}),(o,p)=>(w(),k("div",W,[b(o.$slots,"default",{id:l(a),el:l(t),files:l(e),open:d,remove:f,preview:l(D),drop:n}),c("input",M({id:l(a),ref_key:"inputRef",ref:t,type:"file"},o.$attrs,{class:"hidden",onChange:p[0]||(p[0]=m=>e.value=m.target.files)}),null,16,A)]))}}),H={class:"generator-step-panel"},T=c("div",{class:"generator-step-kicker"},"03",-1),j={class:"generator-upload-shell"},J=["onClick"],q={class:"generator-upload-icon"},z=c("span",{class:"generator-upload-title"},"Upload photo",-1),K=c("span",{class:"generator-upload-hint"},"JPG, PNG or WEBP",-1),O={key:1,class:"generator-upload-preview"},Q=["src"],te=B({__name:"upload",setup(v){const i=S(),_=F(()=>i.generateData),s=F(()=>_.value.photo),r=P(null);return N(r,t=>{const e=(t==null?void 0:t.item(0))||null;if(!e){i.setPhoto("");return}const a=new FileReader;a.readAsDataURL(e),a.onload=()=>i.setPhoto(a.result)}),(t,e)=>{const a=R,u=E,d=G;return w(),k("div",H,[T,c("div",j,[g(a,{icon:"mdi:account-box-outline","filter-file-dropped":n=>{var f;return(f=n==null?void 0:n.type)==null?void 0:f.startsWith("image")},onDrop:e[0]||(e[0]=n=>{r.value=n})},null,8,["filter-file-dropped"]),g(d,{accept:"image/*",modelValue:l(r),"onUpdate:modelValue":e[2]||(e[2]=n=>U(r)?r.value=n:null)},{default:I(({open:n})=>[l(s)?(w(),k("div",O,[c("img",{src:l(s),alt:"Upload photo"},null,8,Q),c("button",{type:"button",class:"generator-remove-photo",onClick:e[1]||(e[1]=f=>l(i).setPhoto(""))},[g(u,{name:"lucide:x"})])])):(w(),k("button",{key:0,type:"button",class:"generator-upload-empty",onClick:n},[c("span",q,[g(u,{name:"lucide:image-plus"})]),z,K],8,J))]),_:1},8,["modelValue"])])])}}});export{te as default};

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.