1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4220],{4220:(e,t,r)=>{r.r(t),r.d(t,{default:()=>L});var l=r(95155),a=r(5917),s=r(75426),n=r(40583),i=r(42196),o=r(13804),d=r(54485),c=r(4788),m=r(39867),u=r(21786),x=r(9295),p=r(12115),h=r(27329),b=r(73161),f=r(97555),g=r(67716),y=r(24033),v=r(49498);let j=g.bL;g.YJ;let w=g.WT,N=p.forwardRef((e,t)=>{let{className:r,children:a,...s}=e;return(0,l.jsxs)(g.l9,{ref:t,className:(0,v.cn)("flex h-14 w-full items-center justify-between rounded-[1.4rem] border border-slate-200 bg-white px-4 py-3 text-left text-base font-medium text-slate-900 shadow-[0_8px_24px_-18px_rgba(15,23,42,0.28)] outline-none transition placeholder:text-slate-400 focus-visible:border-emerald-200 focus-visible:ring-2 focus-visible:ring-emerald-500/20 data-[placeholder]:text-slate-400",r),...s,children:[a,(0,l.jsx)(g.In,{asChild:!0,children:(0,l.jsx)(y.A,{className:"size-4 text-slate-500"})})]})});N.displayName=g.l9.displayName;let k=p.forwardRef((e,t)=>{let{className:r,children:a,position:s="popper",...n}=e;return(0,l.jsx)(g.ZL,{children:(0,l.jsx)(g.UC,{ref:t,position:s,className:(0,v.cn)("z-50 min-w-[var(--radix-select-trigger-width)] overflow-hidden rounded-[1.75rem] border border-slate-200 bg-white p-2 text-slate-900 shadow-[0_24px_60px_-30px_rgba(15,23,42,0.35)]","popper"===s&&"data-[side=bottom]:translate-y-2 data-[side=top]:-translate-y-2",r),...n,children:(0,l.jsx)(g.LM,{className:"flex flex-col gap-1 p-1",children:a})})})});k.displayName=g.UC.displayName;let S=p.forwardRef((e,t)=>{let{className:r,children:s,...n}=e;return(0,l.jsxs)(g.q7,{ref:t,className:(0,v.cn)("relative flex w-full cursor-pointer select-none items-center rounded-[1rem] py-3 pl-10 pr-4 text-base font-medium text-slate-700 outline-none transition focus:bg-slate-100 focus:text-slate-950 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),...n,children:[(0,l.jsx)("span",{className:"absolute left-3 flex size-5 items-center justify-center",children:(0,l.jsx)(g.VF,{children:(0,l.jsx)(a.A,{className:"size-4 text-emerald-500"})})}),(0,l.jsx)(g.p4,{children:s})]})});S.displayName=g.q7.displayName;var C=r(56367),_=r(71724),A=r(6083),T=r(70517);let z="textkits.whisperTextGenerator.history";function P(e){let{item:t,copiedKey:r,onCopy:n,previewSize:i}=e,o=r===t.key;return(0,l.jsxs)("article",{className:"grid gap-3 rounded-[1.25rem] border-2 border-slate-100 bg-white p-3 shadow-[0_18px_45px_-38px_rgba(15,23,42,0.24)] sm:grid-cols-[minmax(0,13rem)_minmax(0,1fr)_auto] sm:items-center",children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,l.jsx)("span",{className:(0,v.cn)("flex size-11 shrink-0 items-center justify-center rounded-[0.85rem] border-2 font-mono text-sm font-black",t.accentClassName),children:t.iconText}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("h3",{className:"text-base font-black leading-tight text-slate-950",children:t.label}),(0,l.jsx)("p",{className:"mt-1 text-xs font-black uppercase tracking-[0.14em] text-slate-400",children:t.compatibility})]})]}),(0,l.jsxs)("div",{className:"min-w-0 rounded-[1rem] border-2 border-slate-100 bg-slate-50 px-4 py-3",children:[(0,l.jsx)("p",{className:"break-words font-mono font-black leading-relaxed text-slate-950",children:(0,l.jsx)("span",{style:{fontSize:"".concat(i,"px")},children:t.output||"Type text to preview this whisper style."})}),(0,l.jsx)("p",{className:"mt-2 text-sm font-medium text-slate-500",children:t.compatibilityNote})]}),(0,l.jsx)(b.$,{type:"button",variant:"ghost",size:"icon",onClick:()=>n(t.key,t.output),disabled:!t.output,"aria-label":"Copy ".concat(t.label),className:"size-11 justify-self-end rounded-[0.85rem] border-2 border-slate-100 bg-white text-emerald-700 hover:bg-emerald-50",children:o?(0,l.jsx)(a.A,{className:"size-5"}):(0,l.jsx)(s.A,{className:"size-5"})})]})}function R(e){let{children:t,htmlFor:r}=e;return(0,l.jsx)("label",{htmlFor:r,className:"text-xs font-black uppercase tracking-[0.14em] text-slate-500",children:t})}function L(){var e,t;let r=(0,p.useRef)(null),g=(0,p.useRef)(null),y=(0,p.useRef)(null),[L,F]=(0,p.useState)("copy"),[U,E]=(0,p.useState)(""),[I,M]=(0,p.useState)(A.iD),[q,D]=(0,p.useState)(""),[O,W]=(0,p.useState)(""),[B,G]=(0,p.useState)(""),[K,J]=(0,p.useState)([]),[V,$]=(0,p.useState)(""),[H,Q]=(0,p.useState)("No image selected. Preview uses a neutral background."),[X,Y]=(0,p.useState)(0),[Z,ee]=(0,p.useState)("darken"),[et,er]=(0,p.useState)("soft-sans"),[el,ea]=(0,p.useState)("#f8fafc"),[es,en]=(0,p.useState)("#0f172a"),[ei,eo]=(0,p.useState)(76),[ed,ec]=(0,p.useState)(8),[em,eu]=(0,p.useState)(64),[ex,ep]=(0,p.useState)("center"),[eh,eb]=(0,p.useState)(!0),[ef,eg]=(0,p.useState)(18),ey=(0,p.useDeferredValue)(U)||A.c5,ev=(0,p.useMemo)(()=>(0,A.Ht)(ey),[ey]),ej=(0,p.useMemo)(()=>(0,A.jR)(ev),[ev]),ew=(0,p.useMemo)(()=>
1(0,A.KM)(q),[q]),eN=(0,A.Xx)(U),ek="share"===O,eS=null!=(e=A.rK.find(e=>e.key===Z))?e:A.rK[0],eC=null!=(t=A.UI.find(e=>e.key===et))?t:A.UI[0];(0,p.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get("text"),t=(0,T.wF)(),r=(e||t||"").slice(0,A.jq);r&&(E(r),M(r)),J(function(){try{let e=JSON.parse(window.localStorage.getItem(z)||"[]");return Array.isArray(e)?e.filter(Boolean).slice(0,5):[]}catch(e){return[]}}())},[]),(0,p.useEffect)(()=>()=>{r.current&&window.clearTimeout(r.current),V&&URL.revokeObjectURL(V)},[V]),(0,p.useEffect)(()=>{if(!V){y.current=null,Y(e=>e+1);return}let e=new Image;e.crossOrigin="anonymous",e.onload=()=>{y.current=e,Q("Image loaded locally."),Y(e=>e+1)},e.onerror=()=>{y.current=null,Q("Could not load that image."),Y(e=>e+1)},e.src=V},[V]);let e_=(0,p.useCallback)(()=>{let e=g.current;if(!e)return;let t=e.getContext("2d"),r=y.current;if(t.clearRect(0,0,1200,900),r){let e=Math.max(1200/r.width,900/r.height),l=r.width*e,a=r.height*e;t.save(),t.filter=eS.canvasFilter,t.drawImage(r,(1200-l)/2,(900-a)/2,l,a),t.restore(),t.fillStyle=eS.overlay,t.fillRect(0,0,1200,900)}else{let e=t.createLinearGradient(0,0,1200,900);e.addColorStop(0,"#0f172a"),e.addColorStop(.48,"#14532d"),e.addColorStop(1,"#f59e0b"),t.fillStyle=e,t.fillRect(0,0,1200,900),t.fillStyle="rgba(255,255,255,0.08)";
1for(let e=0;e<8;e+=1)t.fillRect(170*e-30,0,48,900)}let l=eh?function(e,t,r,l,a,s){for(let l=s;l>=32;l-=2){e.font="800 ".concat(l,"px ").concat(r);let a=Math.round(1.18*l),s=Math.max(1,Math.ceil(String(t||"").split(/\s+/u).filter(Boolean).join(" ").length/20));if(1010>=Math.max(...String(t||"").split(/\n/u).map(t=>e.measureText(t).width),0)&&s*a<=432)return l}return 32}(t,I,eC.family,1010,432,ei):ei,a=Math.round(em/100*720)+110,s="left"===ex?110:"right"===ex?1090:600;t.font="800 ".concat(l,"px ").concat(eC.family),t.textAlign="left"===ex||"right"===ex?ex:"center",t.textBaseline="middle",t.lineJoin="round",t.miterLimit=2,t.strokeStyle=es,t.lineWidth=ed,t.fillStyle=el,function(e,t,r,l,a,s,n){let i=String(t||"").split(/\n/u).flatMap(t=>{let r=t.split(/\s+/u).filter(Boolean);if(!r.length)return[""];let l=[],a="";for(let t of r){let r=a?"".concat(a," ").concat(t):t;e.measureText(r).width<=1010||!a?a=r:(l.push(a),a=t)}return l.push(a),l});i.forEach((t,a)=>{let n=l+a*s;e.strokeText(t,r,n),e.fillText(t,r,n)}),i.length,i.map(t=>e.measureText(t).width)}(t,I||A.iD,s,a,1010,Math.round(1.18*l),0)},[eS.canvasFilter,eS.overlay,eC.family,ex,eh,es,ed,ei,I,em,el]);function eA(e,t){W(e),G(t),r.current&&window.clearTimeout(r.current),r.current=window.setTimeout(()=>{W(""),G("")},2600)}async function eT(e,t,r){if(t)try{await navigator.clipboard.writeText(t),eA(e,r),function(e){let t=String(e||"").trim();if(!t)return;let r=[t,...K.filter(e=>e!==t)].slice(0,5);J(r);try{window.localStorage.setItem(z,JSON.stringify(r.slice(0,5)))}catch(e){}}(t),(0,T.nj)({action:"copy",path:"/whisper-text-generator/",text:t})}catch(e){W(""),G("Copy failed in this browser.")}}async function ez(){let e=new URL(window.location.href);e.searchParams.set("text",ey),await eT("share",e.toString(),"Share link copied.")}return(0,p.useEffect)(()=>{e_()},[e_,X]),(0,l.jsxs)("section",{className:"mx-auto mt-4 w-full max-w-[96rem]",id:"tool",children:[(0,l.jsxs)("div",{className:"overflow-hidden rounded-[2.4rem] border-[6px] border-slate-950 bg-white shadow-[0_38px_110px_-54px_rgba(15,23,42,0.35)] sm:rounded-[2.8rem]",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-4 border-b-2 border-slate-100 px-4 py-4 sm:flex-row sm:items-center sm:justify-between sm:px-7 sm:py-6",children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,l.jsx)("div",{className:"flex size-14 shrink-0 items-center justify-center rounded-[1rem] border-2 border-emerald-200 bg-emerald-50 font-mono text-2xl font-black text-emerald-700",children:"sh"}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("h2",{className:"text-2xl font-black tracking-tighter text-slate-950 sm:text-4xl",children:"Whisper Text Generator"}),(0,l.jsx)("p",{className:"mt-1 text-sm font-medium text-slate-600 sm:text-base",children:"Copy quiet Unicode styles or add whisper captions to a local image."})]})]}),(0,l.jsx)("div",{className:"grid grid-cols-3 gap-2 rounded-[1.25rem] border-2 border-slate-100 bg-slate-50 p-1",children:[["copy","Copy",n.A],["image","Image",i.A],["decode","Decode",o.A]].map(e=>{let[t,r,a]=e;return(0,l.jsxs)("button",{type:"button",onClick:()=>F(t),className:(0,v.cn)("inline-flex h-11 items-center justify-center gap-2 rounded-[0.95rem] px-3 text-sm font-black transition",L===t?"bg-slate-950 text-white shadow-[0_12px_26px_-18px_rgba(15,23,42,0.7)]":"text-slate-600 hover:bg-white hover:text-slate-950"),children:[(0,l.jsx)(a,{className:"size-4"}),r]},t)})})]}),"copy"===L&&(0,l.jsxs)("div",{className:"grid gap-4 p-4 lg:grid-cols-[minmax(0,0.86fr)_minmax(0,1.14fr)] lg:p-6",children:[(0,l.jsxs)("section",{className:"rounded-[1.75rem] border-2 border-slate-100 bg-white p-4 sm:p-5",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,l.jsx)("label",{htmlFor:"whisper-text-input",className:"text-xl font-black text-slate-950",children:"Your text"}),(0,l.jsxs)("span",{className:"rounded-full border-2 border-slate-100 bg-slate-50 px-3 py-1 text-sm font-black text-slate-500",children:[eN," / ",A.jq]})]}),(0,l.jsx)(C.T,{id:"whisper-text-input",value:U,maxLength:A.jq,onChange:e=>{E(e.target.value),M(e.target.value||A.iD)},"data-mobile-full-height":"true",placeholder:"Type quiet text...",className:"mt-4 min-h-[220px] resize-none rounded-[1.25rem] border-2 border-emerald-600 px-5 py-4 font-mono text-[1.1rem] font-medium leading-[1.45] text-slate-950 shadow-none placeholder:text-slate-300 focus-visible:border-emerald-700 focus-visible:ring-0 sm:min-h-[300px] sm:text-[1.3rem]"}),(0,l.jsx)("div",{className:"mt-4 flex flex-wrap gap-2",children:A.Jf.map((e,t)=>(0,l.jsx)("button",{type:"button",title:e.helper,onClick:()=>{E(e.value),M(e.value)},className:(0,v.cn)("rounded-full border-2 border-slate-100 bg-slate-50 px-3 py-2 text-sm font-black text-slate-700 hover:border-emerald-200 hover:bg-emerald-50 hover:text-emerald-800",t>1&&"hidden sm:inline-flex"),children:e.label},e.key))}),(0,l.jsxs)("div",{className:"mt-4 rounded-[1.15rem] border-2 border-slate-100 bg-white px-4 py-3",children:[(0,l.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-3",children:[(0,l.jsx)(R,{htmlFor:"whisper-preview-size",children:"Preview size"}),(0,l.jsxs)("span",{className:"text-sm font-black text-slate-500",children:[ef,"px"]})]}),(0,l.jsx)("input",{id:"whisper-preview-size",type:"range",min:"16",max:"30",value:ef,onChange:e=>eg(Number(e.target.value)),className:"w-full accent-emerald-700"})]}),(0,l.jsxs)("div",{className:"mt-4 rounded-[1.15rem] border-2 border-slate-100 bg-slate-50 px-4 py-3",children:[(0,l.jsx)("p",{className:"text-xs font-black uppercase tracking-[0.14em] text-slate-400",children:"Platform checks"}),(0,l.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:A.sW.map(e=>(0,l.jsx)("span",{className:"rounded-full border-2 border-white bg-white px-3 py-1.5 text-sm font-black text-slate-600",children:e},e))})]}),K.length>0&&(0,l.jsxs)("div",{className:"mt-4 rounded-[1.15rem] border-2 border-amber-100 bg-amber-50 px-4 py-3",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 text-sm font-black text-amber-800",children:[(0,l.jsx)(d.A,{className:"size-4"}),"Recent copies"]}),(0,l.jsx)("div",{className:"mt-3 grid gap-2",children:K.map(e=>(0,l.jsx)("button",{type:"button",onClick:()=>E(e.slice(0,A.jq)),className:"truncate rounded-[0.85rem] bg-white px-3 py-2 text-left font-mono text-sm font-bold text-slate-700 hover:text-slate-950",children:e},e))})]})]}),(0,l.jsxs)("section",{className:"rounded-[1.75rem] border-2 border-slate-100 bg-slate-50 p-4 sm:p-5",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-sm font-black uppercase tracking-[0.16em] text-slate-500",children:"Results"}),(0,l.jsx)("h2",{className:"mt-1 text-2xl font-black tracking-tighter text-slate-950 sm:text-3xl",children:"Copy a whisper style"})]}),(0,l.jsxs)(b.$,{type:"button",onClick:ez,variant:"outline",className:(0,v.cn)("h-11 rounded-[1rem] px-4 text-sm font-black",ek?"border-emerald-200 bg-emerald-50 text-emerald-700":""),children:[ek?(0,l.jsx)(a.A,{className:"size-4","aria-hidden":"true"}):(0,l.jsx)(c.A,{className:"size-4","aria-hidden":"true"}),ek?"Copied":"Share"]})]}),(0,l.jsx)("div",{className:"mt-4 grid gap-3",children:ev.map(e=>(0,l.jsx)(P,{item:e,copiedKey:O,onCopy:(t,r)=>eT(t,r,"".concat(e.label," copied.")),previewSize:ef},e.key))})]})]}),"image"===L&&(0,l.jsxs)("div",{className:"grid gap-4 p-4 lg:grid-cols-[minmax(0,1.08fr)_minmax(22rem,0.92fr)] lg:p-6",children:[(0,l.jsxs)("section",{className:"rounded-[1.75rem] border-2 border-slate-100 bg-slate-950 p-3 sm:p-4",children:[(0,l.jsx)("canvas",{ref:g,
1width:1200,height:900,className:"aspect-[4/3] w-full rounded-[1.2rem] bg-slate-900","aria-label":"Whisper image overlay preview"}),(0,l.jsxs)("div",{className:"mt-3 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsx)("p",{className:"text-sm font-medium text-slate-300",children:H}),(0,l.jsxs)(b.$,{type:"button",onClick:function(){let e=g.current;e&&e.toBlob(e=>{if(!e)return void G("PNG export failed in this browser.");let t=URL.createObjectURL(e),r=document.createElement("a");r.href=t,r.download="whisper-text-generator.png",document.body.append(r),r.click(),r.remove(),URL.revokeObjectURL(t),eA("download","PNG downloaded."),(0,T.nj)({action:"download",path:"/whisper-text-generator/",text:I})},"image/png")},className:"h-11 rounded-[1rem] border-2 border-emerald-300 bg-emerald-500 px-4 text-sm font-black text-slate-950 hover:bg-emerald-400",children:[(0,l.jsx)(m.A,{className:"size-4"}),"Download PNG"]})]})]}),(0,l.jsx)("section",{className:"rounded-[1.75rem] border-2 border-slate-100 bg-white p-4 sm:p-5",children:(0,l.jsxs)("div",{className:"grid gap-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(R,{htmlFor:"whisper-image-upload",children:"Image"}),(0,l.jsxs)("label",{htmlFor:"whisper-image-upload",className:"mt-2 flex min-h-24 cursor-pointer flex-col items-center justify-center rounded-[1.2rem] border-2 border-dashed border-slate-200 bg-slate-50 px-4 py-5 text-center text-sm font-black text-slate-600 hover:border-emerald-200 hover:bg-emerald-50",children:[(0,l.jsx)(u.A,{className:"mb-2 size-5 text-emerald-700"}),"Upload a local image"]}),(0,l.jsx)(f.p,{id:"whisper-image-upload",type:"file",accept:"image/*",onChange:e=>{var t,r=null==(t=e.target.files)?void 0:t[0];if(r){if(!r.type.startsWith("image/"))return void Q("Choose an image file.");V&&URL.revokeObjectURL(V),$(URL.createObjectURL(r)),Q("Loading image locally...")}},className:"sr-only"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(R,{htmlFor:"whisper-overlay-text",children:"Overlay text"}),(0,l.jsx)(C.T,{id:"whisper-overlay-text",value:I,onChange:e=>M(e.target.value),className:"mt-2 min-h-28 resize-none rounded-[1.15rem] border-2 border-slate-200 font-mono text-base"})]}),(0,l.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(R,{children:"Enhancer"}),(0,l.jsx)("div",{className:"mt-2 grid grid-cols-2 gap-2",children:A.rK.map(e=>(0,l.jsx)("button",{type:"button",onClick:()=>ee(e.key),className:(0,v.cn)("h-10 rounded-[0.9rem] border-2 px-3 text-sm font-black",Z===e.key?"border-emerald-700 bg-emerald-50 text-emerald-800":"border-slate-100 bg-slate-50 text-slate-600 hover:bg-white"),children:e.label},e.key))})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(R,{children:"Font stack"}),(0,l.jsxs)(j,{value:et,onValueChange:er,children:[(0,l.jsx)(N,{className:"mt-2 h-10 rounded-[0.9rem] text-sm font-black",children:(0,l.jsx)(w,{})}),(0,l.jsx)(k,{children:A.UI.map(e=>(0,l.jsx)(S,{value:e.key,children:e.label},e.key))})]})]})]}),(0,l.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(R,{htmlFor:"whisper-text-color",children:"Text color"}),(0,l.jsx)(f.p,{id:"whisper-text-color",type:"color",value:el,onChange:e=>ea(e.target.value),className:"mt-2 h-11 rounded-[0.9rem] p-1"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(R,{htmlFor:"whisper-border-color",children:"Border color"}),(0,l.jsx)(f.p,{id:"whisper-border-color",type:"color",value:es,onChange:e=>en(e.target.value),className:"mt-2 h-11 rounded-[0.9rem] p-1"})]})]}),(0,l.jsxs)("div",{className:"grid gap-3",children:[(0,l.jsxs)("label",{className:"flex items-center gap-3 rounded-[1rem] border-2 border-slate-100 bg-slate-50 px-3 py-2 text-sm font-black text-slate-700",children:[(0,l.jsx)("input",{type:"checkbox",checked:eh,onChange:e=>eb(e.target.checked),className:"size-4 accent-emerald-700"}),"Auto-fit overlay text"]}),[["whisper-font-size","Size",ei,32,140,eo],["whisper-border-width","Border",ed,0,18,ec],["whisper-position","Position",em,12,88,eu]].map(e=>{let[t,r,a,s,n,i]=e;return(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"mb-2 flex justify-between",children:[(0,l.jsx)(R,{htmlFor:t,children:r}),(0,l.jsx)("span",{className:"text-sm font-black text-slate-500",children:a})]}),(0,l.jsx)("input",{id:t,type:"range",min:s,max:n,value:a,onChange:e=>i(Number(e.target.value)),className:"w-full accent-emerald-700"})]},t)})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(R,{children:"Alignment"}),(0,l.jsx)("div",{className:"mt-2 grid grid-cols-3 gap-2",children:["left","center","right"].map(e=>(0,l.jsx)("button",{type:"button",onClick:()=>ep(e),className:(0,v.cn)("h-10 rounded-[0.9rem] border-2 text-sm font-black capitalize",ex===e?"border-slate-950 bg-slate-950 text-white":"border-slate-100 bg-slate-50 text-slate-600 hover:bg-white"),children:e},e))})]}),(0,l.jsxs)("div",{className:"rounded-[1.15rem] border-2 border-slate-100 bg-slate-50 px-4 py-3 text-sm font-medium leading-relaxed text-slate-600",children:["PNG settings: ",eS.label,", ",eC.label,", ",ex,","," ",eh?"auto-fit":"".concat(ei,"px"),", border ",ed,"px."]})]})})]}),"decode"===L&&(0,l.jsxs)("div",{className:"grid gap-4 p-4 lg:grid-cols-2 lg:p-6",children:[(0,l.jsxs)("section",{className:"rounded-[1.75rem] border-2 border-slate-100 bg-white p-4 sm:p-5",children:[(0,l.jsx)("label",{htmlFor:"whisper-
1decoder-input",className:"text-xl font-black text-slate-950",children:"Whisper text to decode"}),(0,l.jsx)(C.T,{id:"whisper-decoder-input",value:q,onChange:e=>D(e.target.value),placeholder:"Paste tiny, small caps, subscript, or spaced whisper text...",className:"mt-4 min-h-[260px] resize-none rounded-[1.25rem] border-2 border-slate-200 font-mono text-base"})]}),(0,l.jsxs)("section",{className:"rounded-[1.75rem] border-2 border-slate-100 bg-slate-50 p-4 sm:p-5",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,l.jsx)("h2",{className:"text-2xl font-black tracking-tighter text-slate-950",children:"Normal text"}),(0,l.jsxs)(b.$,{type:"button",variant:"outline",onClick:()=>eT("decoded",ew,"Decoded text copied."),disabled:!ew,className:"h-11 rounded-[1rem] px-4 text-sm font-black",children:[(0,l.jsx)(s.A,{className:"size-4"}),"Copy"]})]}),(0,l.jsx)("div",{className:"mt-4 min-h-[260px] rounded-[1.25rem] border-2 border-slate-100 bg-white px-5 py-4",children:(0,l.jsx)("p",{className:"break-words font-mono text-xl font-black leading-relaxed text-slate-950",children:ew||"Decoded text appears here."})})]})]}),(0,l.jsxs)("div",{className:"grid gap-3 border-t-2 border-slate-100 bg-white px-4 py-4 sm:grid-cols-[auto_auto_minmax(0,1fr)] sm:items-center sm:px-7",children:[(0,l.jsxs)(b.$,{type:"button",onClick:()=>eT("all",ej,"All whisper styles copied."),disabled:!ej,className:"h-12 rounded-[1.05rem] border-4 border-emerald-800 bg-emerald-700 px-5 text-base font-black text-white shadow-[0_7px_0_0_#065f46] hover:bg-emerald-800",children:["all"===O?(0,l.jsx)(a.A,{className:"size-5"}):(0,l.jsx)(s.A,{className:"size-5"}),"Copy all"]}),(0,l.jsxs)(b.$,{type:"button",variant:"outline",onClick:()=>{E(""),M(A.iD),D(""),G("Draft cleared.")},className:"h-12 rounded-[1.05rem] border-2 border-slate-200 bg-white px-5 text-base font-black text-slate-950 hover:bg-slate-50",children:[(0,l.jsx)(x.A,{className:"size-5"}),"Clear"]}),(0,l.jsx)("p",{role:"status","aria-live":"polite",className:"min-h-6 text-sm font-medium text-emerald-700 sm:text-base",children:B||"".concat(ev.length," styles ready. Image export stays local.")})]}),(0,l.jsx)(h.Ay,{currentPath:"/whisper-text-generator/",homepageLabel:"All Text Tools"})]}),(0,l.jsx)(_.A,{})]})}},6083:(e,t,r)=>{r.d(t,{Ht:()=>w,Jf:()=>g,KM:()=>S,UI:()=>v,Xx:()=>f,c5:()=>l,iD:()=>s,jR:()=>N,jq:()=>a,rK:()=>j,sW:()=>y});let l="quiet demo",a=220,s="quiet demo\nsoft overlay",n="ABCDEFGHIJKLMNOPQRSTUVWXYZ",i="abcdefghijklmnopqrstuvwxyz",o="0123456789";function d(e){return e.map(e=>e?String.fromCodePoint(e):void 0)}function c(e){let{upper:t=[],lower:r=[],digits:l=[]}=e,a=new Map;return Array.from(n).forEach((e,r)=>{t[r]&&a.set(e,t[r])}),Array.from(i).forEach((e,t)=>{r[t]&&a.set(e,r[t])}),Array.from(o).forEach((e,t)=>{l[t]&&a.set(e,l[t])}),a}let m=c({upper:d([7468,7470,null,7472,7473,null,7475,7476,7477,7478,7479,7480,7481,7482,7484,7486,null,7487,null,7488,7489,11389,7490,null,null,null]),lower:d([7491,7495,7580,7496,7497,7584,7501,688,8305,690,7503,737,7504,8319,7506,7510,null,691,738,7511,7512,7515,695,739,696,7611]),digits:d([8304,185,178,179,8308,8309,8310,8311,8312,8313])}),u=c({upper:d([7468,7470,null,7472,7473,null,7475,7476,7477,7478,7479,7480,7481,7482,7484,7486,null,7487,null,7488,7489,11389,7490,null,null,null]),lower:d([7491,7495,7580,7496,7497,7584,7501,688,8305,690,7503,737,7504,8319,7506,7510,null,691,738,7511,7512,7515,695,739,696,7611]),digits:d([8304,185,178,179,8308,8309,8310,8311,8312,8313])}),x=c({lower:d([8336,null,null,null,8337,null,null,8341,7522,11388,8342,8343,8344,8345,8338,8346,null,7523,8347,8348,7524,7525,null,8339,null,null]),digits:d([8320,8321,8322,8323,8324,8325,8326,8327,8328,8329])}),p=new Map([["a",String.fromCodePoint(7424)],["b",String.fromCodePoint(665)],["c",String.fromCodePoint(7428)],["d",String.fromCodePoint(7429)],["e",String.fromCodePoint(7431)],["f",String.fromCodePoint(42800)],["g",String.fromCodePoint(610)],["h",String.fromCodePoint(668)],["i",String.fromCodePoint(618)],["j",String.fromCodePoint(7434)],["k",String.fromCodePoint(7435)],["l",String.fromCodePoint(671)],["m",String.fromCodePoint(7437)],["n",String.fromCodePoint(628)],["o",String.fromCodePoint(7439)],["p",String.fromCodePoint(7448)],["r",String.fromCodePoint(640)],["s","s"],["t",String.fromCodePoint(7451)],["u",String.fromCodePoint(7452)],["v",String.fromCodePoint(7456)],["w",String.fromCodePoint(7457)],["x","x"],["y",String.fromCodePoint(655)],["z","z"]]);function h(e,t){return Array.from(String(null!=e?e:""),e=>{var r,l;let a=e.toLowerCase();return null!=(l=null!=(r=t.get(e))?r:t.get(a))?l:e}).join("")}function b(e){return Array.from(String(null!=e?e:"")).length}function f(e){return b(e)}let g=[{key:"instagram-bio",label:"Instagram bio",value:"quiet account",helper:"Compact profile line"},{key:"caption-aside",label:"Caption aside",value:"soft launch",helper:"Small aside for captions"},{key:"meme-overlay",label:"Image whisper",value:"just between us",helper:"Subtle image overlay"},{key:"profile-note",label:"Profile note",value:"low volume",helper:"Quiet display text"}],y=["Instagram","TikTok","Discord","Pinterest","Profile field"],v=[{key:"soft-sans",label:"Soft Sans",family:"Inter, Arial, sans-serif"},{key:"quiet-serif",label:"Quiet Serif",family:"Georgia, 'Times New Roman', serif"}
1,{key:"note-mono",label:"Note Mono",family:"'Courier New', Courier, monospace"}],j=[{key:"original",label:"Original",canvasFilter:"none",overlay:"rgba(15, 23, 42, 0)"},{key:"darken",label:"Darken",canvasFilter:"brightness(0.76) saturate(0.94)",overlay:"rgba(15, 23, 42, 0.18)"},{key:"blur",label:"Blur",canvasFilter:"blur(2.4px) brightness(0.88)",overlay:"rgba(15, 23, 42, 0.1)"},{key:"desaturate",label:"Desaturate",canvasFilter:"grayscale(0.9) contrast(1.04)",overlay:"rgba(15, 23, 42, 0.08)"}];function w(e){let t=String(null!=e?e:"");return[{key:"soft-whisper",label:"Soft whisper",shortLabel:"Soft",compatibility:"Safer",description:"Tiny raised letters for bios, comments, and quiet aside text.",output:h(t,m),accentClassName:"border-emerald-100 bg-emerald-50 text-emerald-800",iconText:"Tt"},{key:"subtle-whisper",label:"Subtle whisper",shortLabel:"Subtle",compatibility:"Decorative",description:"Lower small letters that read like a quiet footnote.",output:h(t,x),accentClassName:"border-sky-100 bg-sky-50 text-sky-800",iconText:"T_"},{key:"whispered-elegance",label:"Whispered elegance",shortLabel:"Elegance",compatibility:"Safer",description:"Small caps for compact names and readable profile text.",output:h(t,p),accentClassName:"border-amber-100 bg-amber-50 text-amber-800",iconText:"SC"},{key:"raised-secret",label:"Raised secret",shortLabel:"Raised",compatibility:"Decorative",description:"Superscript-style quiet text for a raised aside.",output:h(t,u),accentClassName:"border-pink-100 bg-pink-50 text-pink-800",iconText:"T+"},{key:"airy-whisper",label:"Airy whisper",shortLabel:"Airy",compatibility:"Fragile",description:"Adds thin spaces for a hushed, spread-out look.",output:Array.from(String(null!=t?t:"")).map(e=>/\s/u.test(e)?" ":"".concat(e,"â")).join("").trim(),accentClassName:"border-violet-100 bg-violet-50 text-violet-800",iconText:"A"},{key:"quiet-caption",label:"Quiet caption",shortLabel:"Caption",compatibility:"Safer",description:"Frames the line as a soft caption without changing letters.",output:function(e){let t=String(null!=e?e:"").trim();return t?"ï¹".concat(t,"ï¹"):""}(t),accentClassName:"border-stone-200 bg-stone-50 text-stone-800",iconText:"()"}].map(e=>{let r=function(e,t){let r=Array.from(String(null!=e?e:"")),l=Array.from(String(null!=t?t:""));return r.reduce((e,t,r)=>e+ +(t!==l[r]),0)}(t,e.output),l=b(e.output);return{...e,changedCount:r,characterCount:l,compatibilityNote:"Fragile"===e.compatibility?"Spacing can collapse in some apps.":r<b(t.replace(/\s/gu,""))?"Some letters may stay normal.":"Copy-ready Unicode text."}})}function N(e){return e.filter(e=>e.output).map(e=>"".concat(e.label,": ").concat(e.output)).join("\n")}let k=function(){let e=new Map,t="".concat(n).concat(i).concat(o);for(let r of[m,u,x,p])for(let l of Array.from(t)){let t=h(l,r);t!==l&&e.set(t,l.toLowerCase())}return e.set("ï¹","("),e.set("ï¹",")"),e.set("â",""),e}();function S(e){return Array.from(String(null!=e?e:""),e=>{var t;return null!=(t=k.get(e))?t:e}).join("").replace(/[ \t]{2,}/gu," ").trim()}},56367:(e,t,r)=>{r.d(t,{T:()=>o});var l=r(95155),a=r(12115),s=r(65229),n=r(49498);let i="flex min-h-[120px] w-full rounded-[1.8rem] border border-slate-200 bg-white px-5 py-4 text-base text-slate-900 shadow-[0_8px_24px_-18px_rgba(15,23,42,0.28)] outline-none transition placeholder:text-slate-400 focus-visible:border-emerald-200 focus-visible:ring-2 focus-visible:ring-emerald-500/20 disabled:cursor-not-allowed disabled:opacity-50",o=a.forwardRef((e,t)=>{var r;let{className:o,value:d,defaultValue:c,onChange:m,onFocus:u,readOnly:x,disabled:p,placeholder:h,"data-mobile-full-height":b,...f}=e,[g,y]=a.useState(!1),v=a.useRef(null),j=a.useRef(null),w=!x&&!p&&!b,N=null!=(r=null!=d?d:c)?r:"",k="string"==typeof o&&o.includes("convert-normal-input-attention");function S(){return window.matchMedia("(max-width: 639px)").matches}return(a.useImperativeHandle(t,()=>({get element(){return v.current},focus:()=>{var e;if(w&&S())return void y(!0);null==(e=v.current)||e.focus()},blur:()=>{var e;return null==(e=v.current)?void 0:e.blur()},select:()=>{var e;return null==(e=v.current)?void 0:e.select()},setSelectionRange:function(){for(var e,t,r=arguments.length,l=Array(r),a=0;a<r;a++)l[a]=arguments[a];return null==(t=v.current)||null==(e=t.setSelectionRange)?void 0:e.call(t,...l)},get selectionStart(){var e,t;return null!=(t=null==(e=v.current)?void 0:e.selectionStart)?t:0},get selectionEnd(){var r,l;return null!=(l=null==(r=v.current)?void 0:r.selectionEnd)?l:0},get value(){var a;return null==(a=v.current)?void 0:a.value}})),a.useEffect(()=>{if(!g)return;let e=document.body.style.overflow;function t(e){"Escape"===e.key&&y(!1)}
1return document.body.style.overflow="hidden",window.requestAnimationFrame(()=>{var e;null==(e=j.current)||e.focus()}),window.addEventListener("keydown",t),()=>{document.body.style.overflow=e,window.removeEventListener("keydown",t)}},[g]),w)?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("button",{type:"button",onClick:()=>y(!0),className:(0,n.cn)("block min-h-40 w-full rounded-[1.4rem] border border-slate-200 bg-white px-4 py-4 text-left shadow-[0_8px_24px_-18px_rgba(15,23,42,0.28)] sm:hidden",k?"convert-normal-input-attention border-emerald-500":""),"aria-label":"Open text editor",children:(0,l.jsx)("span",{className:(0,n.cn)("line-clamp-5 block text-xl font-black leading-tight",N?"text-slate-900":"text-slate-300"),children:N||h||"Tap to enter text..."})}),(0,l.jsx)("textarea",{ref:v,value:d,defaultValue:c,onChange:m,onFocus:function(e){null==u||u(e),w&&S()&&(e.currentTarget.blur(),y(!0))},readOnly:x,disabled:p,placeholder:h,className:(0,n.cn)(i,"hidden sm:flex",o),...f}),g?(0,l.jsxs)("div",{className:"fixed inset-0 z-50 flex items-end bg-slate-950/55 px-3 py-4 backdrop-blur-sm sm:hidden",role:"dialog","aria-modal":"true","aria-label":"Text input editor",children:[(0,l.jsx)("button",{type:"button",className:"absolute inset-0","aria-label":"Close text editor",onClick:()=>y(!1)}),(0,l.jsxs)("div",{className:"relative w-full rounded-[2rem] border-4 border-slate-100 bg-white p-4 shadow-2xl",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-sm font-black uppercase tracking-[0.08em] text-slate-500",children:"Text"}),(0,l.jsx)("p",{className:"text-lg font-black tracking-tight text-slate-950",children:"Edit input"})]}),(0,l.jsx)("button",{type:"button",onClick:()=>y(!1),className:"inline-flex size-10 items-center justify-center rounded-full border-2 border-slate-100 bg-white text-slate-700","aria-label":"Close text editor",children:(0,l.jsx)(s.A,{className:"size-5"})})]}),(0,l.jsx)("textarea",{ref:j,value:d,defaultValue:c,onChange:m,onFocus:u,placeholder:h,maxLength:f.maxLength,className:(0,n.cn)(i,"mt-3 min-h-[45vh] resize-none rounded-[1.4rem] border-2 border-slate-100 bg-slate-50 p-4 text-xl font-bold leading-tight text-slate-900 shadow-none placeholder:text-slate-300 focus-visible:border-emerald-200 focus-visible:ring-2 focus-visible:ring-emerald-500/20"),"data-mobile-full-height":"true"}),(0,l.jsxs)("div",{className:"mt-3 grid grid-cols-[1fr_auto] gap-2",children:[(0,l.jsx)("button",{type:"button",onClick:()=>y(!1),className:"inline-flex h-12 items-center justify-center rounded-full border-4 border-emerald-800 bg-emerald-700 px-6 text-base font-black text-white shadow-[0_6px_0_0_#065f46] active:translate-y-1.5 active:shadow-none",children:"Done"}),(0,l.jsx)("button",{type:"button",onClick:()=>{null==m||m({target:{value:""},currentTarget:{value:""}})},className:"inline-flex h-12 items-center justify-center rounded-full border-2 border-slate-200 bg-white px-5 text-base font-black text-slate-700",children:"Clear"})]})]})]}):null]}):(0,l.jsx)("textarea",{ref:v,value:d,defaultValue:c,onChange:m,onFocus:u,readOnly:x,disabled:p,placeholder:h,"data-mobile-full-height":b,className:(0,n.cn)(i,o),...f})});o.displayName="Textarea"},71724:(e,t,r)=>{r.d(t,{A:()=>a});var l=r(95155);function a(e){let{saves:t=!1,className:r=""}=e;return(0,l.jsx)("p",{className:"mt-4 text-center text-3xl font-medium leading-tight text-slate-500 sm:text-[2.625rem] ".concat(r).trim(),children:t?"Runs and saves in your browser.":"Runs locally in your browser."})}},97555:(e,t,r)=>{r.d(t,{p:()=>n});var l=r(95155),a=r(12115),s=r(49498);let n=a.forwardRef((e,t)=>{let{className:r,type:a="text",...n}=e;return(0,l.jsx)("input",{ref:t,type:a,className:(0,s.cn)("flex h-14 w-full rounded-[1.4rem] border border-slate-200 bg-white px-4 py-3 text-base font-medium text-slate-900 shadow-[0_8px_24px_-18px_rgba(15,23,42,0.28)] outline-none transition placeholder:text-slate-400 focus-visible:border-emerald-200 focus-visible:ring-2 focus-visible:ring-emerald-500/20",r),...n})});n.displayName="Input"}}]);
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.