1import{_ as N}from"./CLs02svK.js";import{_ as O}from"./CwsxZ-0Q.js";import{C as P,al as $,bh as L,r as m,n as s,aJ as o,o as g,p as y,b as U,aw as A,B as h,bl as u,aB as l,au as k,i as F,ao as c,x as Y,ah as W,z as C,l as z}from"./qiiO-fSN.js";import{_ as J}from"./BMQvDq9e.js";import{b as D}from"./CzR0JYjW.js";import"./Pj4DukYz.js";import"./DLhbZfYv.js";const p=[{key:"name",label:"Name",hint:"As you want it credited",rows:1},{key:"location",label:"Based in",hint:"City and country",rows:1},{key:"bioShort",label:"Short bio",hint:"The 50-word version",limit:50,rows:4},{key:"bioLong",label:"Long bio",hint:"The 150 to 250-word version",limit:250,rows:8},{key:"statement",label:"Artist statement",hint:"What your work is about",limit:300,rows:8},{key:"cv",label:"Exhibitions and awards",hint:"One per line, newest first",rows:8},{key:"links",label:"Links",hint:"Portfolio, Instagram, anything else",rows:4}],b="pixcontests:applicant-profile";function S(a){const e=a.trim();return e?e.split(/\s+/).length:0}function K(){try{const a=localStorage.getItem(b);return a?JSON.parse(a):{}}catch{return{}}}function R(a){try{return localStorage.setItem(b,JSON.stringify(a)),!0}catch{return!1}}function j(){try{localStorage.removeItem(b)}catch{}}function G(a){return p.filter(e=>a[e.key]?.trim()).map(e=>`${e.label} 2${(a[e.key]??"").trim()}`).join(` 3 4`)}const M={class:"wrap"},q={class:"mx-auto max-w-3xl py-10 sm:py-14"},H={class:"mt-8 space-y-6 border-t border-ink pt-8"},Q={key:0,class:"mt-1.5"},X={class:"mt-8 flex flex-wrap items-center gap-x-5 gap-y-3 border-t border-rule pt-6"},Z={class:"ml-auto text-sm text-ink-3"},ie=P({__name:"profile",setup(a){D({title:"Your application details | Pixcontests",description:"Keep the bio, artist statement, CV and links that open calls ask for, ready to paste. Saved in your browser, never sent to us.",path:"/profile"});const e=k({}),_=k(!0),i=k(null);$(()=>{e.value=K()});let w;L(e,r=>{clearTimeout(w),w=setTimeout(()=>{_.value=R(r)},400)},{deep:!0});async function f(r,n){try{await navigator.clipboard.writeText(n),i.value=r,setTimeout(()=>{i.value===r&&(i.value=null)},1500)}catch{}}function T(){f("__all",G(e.value))}function E(){confirm("Erase everything saved here? This can't be undone.")&&(j(),e.value={})}const d=z(()=>p.filter(r=>e.value[r.key]?.trim()).length);return(r,n)=>{const V=N,B=O,v=F,I=J;return c(),m("div",M,[s("div",q,[n[0]||(n[0]=s("h1",{class:"serif-title text-[30px] leading-[1.05] sm:text-[46px]"},"Your application details",-1)),n[1]||(n[1]=s("p",{class:"mt-3 max-w-[62ch] text-ink-2"}," Open calls ask the same things over and over: a short bio, a longer one, a statement, what you've shown and where to find you. Write them once here and copy them across. ",-1)),n[2]||(n[2]=s("p",{class:"mt-2 max-w-[62
4ch] text-sm text-ink-3"}," This stays in your browser. It never reaches us, so there's no account to make and nothing of yours on our servers. ",-1)),o(_)?y("",!0):(c(),g(V,{key:0,color:"neutral",variant:"subtle",icon:"i-lucide-info",class:"mt-5",description:"Your browser won't save this: private mode, or site data switched off. You can still write and copy, but it will be gone when you close the tab."})),s("div",H,[(c(!0),m(U,null,A(o(p),t=>(c(),g(I,{key:t.key,label:t.label,name:t.key},Y({default:u(()=>[h(B,{modelValue:o(e)[t.key],"onUpdate:modelValue":x=>o(e)[t.key]=x,rows:t.rows,placeholder:t.hint,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","rows","placeholder"]),o(e)[t.key]?.trim()?(c(),m("div",Q,[h(v,{type:"button",color:"neutral",variant:"ghost",size:"xs",icon:o(i)===t.key?"i-lucide-check":"i-lucide-copy",onClick:x=>f(t.key,o(e)[t.key]??"")},{default:u(()=>[C(l(o(i)===t.key?"Copied":"Copy"),1)]),_:2},1032,["icon","onClick"])])):y("",!0)]),_:2},[t.limit?{name:"hint",fn:u(()=>[s("span",{class:W(["num text-xs",o(S)(o(e)[t.key]??"")>t.limit?"font-semibold text-accent":"text-ink-3"])},l(o(S)(o(e)[t.key]??""))+" / "+l(t.limit)+" words ",3)]),key:"0"}:void 0]),1032,["label","name"]))),128))]),s("div",X,[h(v,{type:"button",color:"primary",disabled:!o(d),onClick:T},{default:u(()=>[C(l(o(i)==="__all"?"Copied everything":"Copy everything"),1)]),_:1},8,["disabled"]),o(d)?(c(),m("button",{key:0,type:"button",class:"link text-sm",onClick:E},"Erase it all")):y("",!0),s("span",Z,l(o(d))+" of "+l(o(p).length)+" filled in",1)])])])}}});export{ie 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.